Update hubic.py

Update hubic.py so that it can be used as a module from other apps