Library to enable control of Screenly OSE digital signage via REST API.
Project description
Screenly OSE API Client
Library to enable control of Screenly OSE digital signage via REST API.
- Free software: MIT license
Sample Usage
import asyncio
import aiohttp
import screenly_ose
async def run():
async with aiohttp.ClientSession() as session:
screenly = screenly_ose.Screenly(session, '192.168.1.112')
asset = await screenly.get_current_asset()
print(asset)
asyncio.run(run())
API
Constructor
-
Screenly(websession, hostname, port=80, encryption=False, timeout=None)
Creates a new connection to a Screenly OSE instance running on the given hostname and port.
Methods
All instance methods return False
in the event of a request error.
-
get_current_asset()
Returns a dict containing the following info about the asset currently being displayed:
id
The asset IDname
The asset nametype
The asset type
-
next_asset()
Requests Screenly to display the next asset in the sequence.
-
previous_asset()
Requests Screenly to display the previous asset in the sequence.
-
switch_asset(asset_id)
Requests Screenly to display the asset with the given ID string.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
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
File details
Details for the file screenly_ose-0.0.4.tar.gz
.
File metadata
- Download URL: screenly_ose-0.0.4.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e276aaa6b5ff48ae5033367f8ed0d1d90fe9fc3b92ca63d269d5661113e501f |
|
MD5 | 2db0ef87379349ee5d878af68e6168e0 |
|
BLAKE2b-256 | 585b36dc4fa5739197561703ece53dbf893a9508bac939313018c66f77d4ba71 |
File details
Details for the file screenly_ose-0.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: screenly_ose-0.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d1381e2e8ad89404f943e8e690bfd20157636c77cc15aecbb3faae2da149da4 |
|
MD5 | cfc4f8d9ce0224c773f66bdce1b21ec2 |
|
BLAKE2b-256 | 7fd80ef26919a67f72bb84ec3e43d8c6124fbcbb9c5e32bac5bd643d7cdc601c |