A library to connect to and interact with the Gumband platform
Project description
Gumband™ Python SDK
The Gumband Python library is a Gumband integration provides a way for developers to interact with their components on the Gumband platform: send/receive controls, manage content, and more.
Features Available in this SDK
At this time, this library provides the following features:
- Monitoring application health with custom statuses
- Monitoring application through error, warning, and debug logs
- Managing application content and configurations with settings
- Syncing remote files to your local exhibit
- Triggering application events through control signals
- Tracking application interaction metrics
- Dispatching custom email notifications
Usage
Gumband Documentation contains a full tutorial, guides, and examples for using this library.
Basic Connection
After creating a component for your exhibit, you will be given an API token to authenticate your python application with the Gumband platform.
- replace
exhibit_idwith the ID of your software component - replace
exhibit_tokenwith the API token the platform gave you
The library is built around Python's built-in asyncio, so your application will need to create a wrapper for it to run.
example.py
import asyncio
from gumband_python_sdk import Gumband
from manifest import manifest
exhibit_id = 1
exhibit_token = "ae132...di2lk9"
class GumbandWrapper:
def __init__(self, exhibit_id, token, manifest):
"""
Initialize the GumbandWrapper with necessary parameters.
"""
self.gumband = Gumband(exhibit_id=exhibit_id, token=token, manifest=manifest)
async def start(self):
"""
Start the Gumband connection and keep it running.
"""
await self.gumband.connect()
while True:
await asyncio.sleep(1)
# Instantiate and run the handler
if __name__ == "__main__":
handler = GumbandWrapper(
exhibit_id=exhibit_id,
token=exhibit_token,
manifest=manifest,
)
asyncio.run(handler.start())
With it you will need a manifest that defines the various controls your appliction has.
manifest.py
manifest = {
"manifest": {
"statuses": [
{
"id": 'screen-status',
"type": 'String',
"display": 'Screen is currently showing:',
"order": 0,
},
{
"id": 'last-game-played',
"type": 'String',
"display": 'Last game played:',
"order": 1,
},
],
"controls": [],
"settings": [],
},
}
Running example.py should result in your software component now appearing online with two statuses.
Going further
For a full tutorial, guides, and examples for this library as well as the Gumband platform and other additional resources go to docs.gumband.com
Contributions & Feedback
Have any feedback about using this library or about the Gumband platform? Run into any issues? Until we have a dedicated issue/bug tracker reach out to support@gumband.com.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gumband-0.1.0a3.tar.gz.
File metadata
- Download URL: gumband-0.1.0a3.tar.gz
- Upload date:
- Size: 33.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ee454d36cf4219536998e44197e6f6d6deba9f70d131d96cc8aad0a4ce6640f
|
|
| MD5 |
e2ea918c8013494a83d14283ddcb1f7b
|
|
| BLAKE2b-256 |
9be609c002ae1d55bf45d79fd6771876fb0865200eb2992c3ebda0c87aecec7b
|
File details
Details for the file gumband-0.1.0a3-py3-none-any.whl.
File metadata
- Download URL: gumband-0.1.0a3-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ee6f4733a314b24ac45e7fba9a5efe7e2519d471a78ddc221ff0030b85818da
|
|
| MD5 |
c0ed92aed8cdc2725607a40e19914f91
|
|
| BLAKE2b-256 |
5407831851e3c2932c34db96439509ec7bba9a3c2578538de68991a8d3a64743
|