1. prereqs

yum -y install python3-pip
pip3 install --upgrade pip
python3 -m pip install SMA-SunnyBoy requests

2. sample

vi lore
#!/bin/python3
from sma_sunnyboy import *
client = WebConnect("10.1.1.12", Right.USER, "Passw0rd")
client.auth()
data = client.get_all_keys()
print(data)
client.logout()
chmod +x ./lore
./lore
/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:986: InsecureRequestWarning:
Unverified HTTPS request is being made to host '10.0.0.61'.
Adding certificate verification is strongly advised.
See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,

3. debug

/usr/local/lib/python3.6/site-packages/sma_sunnyboy/key.py
/usr/local/lib/python3.6/site-packages/sma_sunnyboy/sma.py

4. references