Python module to simplify using the BrightSign BSN/BSNEE API.
Project description
pybrightsign
Python module to simplify using the BrightSign BSN/BSNEE API.
NOTE: this is early work in progress - interfaces subject to radical changes
Install with pip
as usual:
pip install pybrightsign
Introduction
This library abstracts away authorization details and Upload API details, leaving the developer free to use the APIs directly and at as low a level as one would if using just the requests library without a bunch of boilerplate code.
Here is an example of using the Devices endpoint to show a list the names of all devices in a network:
from pybrightsign import Server
creds = {
'network': 'My BSN Network',
'username': 'user@example.org',
'password': 'swordfish'
}
bsnee = Server('brightsign.example.com')
bsnee.authorize(creds)
devices = bsnee.requests.get('/devices').json()['items']
for device in devices:
print(device['name'])
Even more powerful is the abstraction of the Upload endpoint, for example uploading a video, an image (to a particular folder), then uploading a web site (including the index.html and all css, js, images, etc. in the same folder):
from pybrightsign import Server
creds = {
'network': 'My BSN Network',
'username': 'user@example.org',
'password': 'swordfish'
}
bsnee = Server('brightsign.example.com')
bsnee.authorize(creds)
bsnee.upload_file('promo.mp4')
bsnee.upload_file('logo.png', r'\Shared\Images')
bsnee.upload_web_folder('./website/index.html')
...more to come...
Project details
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
Hashes for pybrightsign-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62d1b1515253951f996e308693111b175225e0a6779e4dbba27708567389ee70 |
|
MD5 | 95d9bb28c90cd5ccd9d6b2dfbe65a473 |
|
BLAKE2b-256 | a892395f26d434bff3516a2a1c45072adefa86b2c0d59df125e94821c6c586bb |