wilzbach / hub-sdk-python

A Python SDK to access the Asyncy Hub, which supports caching and more

Home Page:https://hub.asyncy.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyPi CircleCI Codecov Contributor Covenant Code style: black

hub-sdk-python

A Python SDK to access the Storyscript Hub, which supports caching and more

Developer

Furthermore, install pre-commit and set up a git hook:

pip install --user pre-commit
pre-commit install

This will ensure that every commit is formatted according to black.

Legacy Usage

from storyhub.sdk.StoryscriptHub import StoryscriptHub

python_service = StoryscriptHub().get("python")

print("Service Name:", python_service.name)
print("UUID:", python_service.service_uuid)
print("Alias:", python_service.alias)
print("Username:", python_service.username)
print("Service Data:", python_service.raw_data)

Advanced Usage

The Storyscript Hub SDK provides the ability to safely access the entire hub service data.

from storyhub.sdk.StoryscriptHub import StoryscriptHub

# tell the hub sdk to utilize the service wrapper
# making it easy to access objects safely
hub = StoryscriptHub(service_wrapper=True)

python_service = StoryscriptHub(service_wrapper=True).get("python")

configuration = python_service.configuration()

print("License Type:", configuration.license().name())
print("Startup Command:", configuration.lifecycle().startup().command())

About

A Python SDK to access the Asyncy Hub, which supports caching and more

https://hub.asyncy.com

License:Apache License 2.0


Languages

Language:Python 100.0%