PiSugar's independent Python driver, and there is no need to install PiSugar-server additionally. Just meet the requirements.
python 3.5+
Python example
from pisugar import *
pisugar=PiSugarServer()
pisugar.get_battery_level()
NOTE: After the program initializes, it will launch a background process that retrieves information every ten seconds to facilitate the subsequent activation of the automatic low-battery shutdown feature.
Apache License Version 2.0