smartengine Package
This package simplifies the usage of smartengine's Restful-Api. More specifically it simplifies retrieving data from the Api. The data that can be retrieved includes sensor data such as serial_number, name and data sensors are continuesly collecting as well as location data such as location ids, location names and location sensors.
Installation
This package can be installed via the pip install command.
pip install smartengine
Before Usage
Make sure the device that is running this code is connected to the master of the smartengine-system. It's either a smartengine or a smartdirector. The device should preferably be in the same network as the master of the smartengine-system. Physical direct Ethernet connection also works.
Examples
1 - Import Package:
from smartengine.r_api import fixtures, location, restful
from smartengine.u_api import subscribe, set, unified
2 - Initiate rAPI:
smartengine1 = fixtures.FixturesApi(
user="<some_user>",
password="<some_password>",
ipv4_adress="<master_ipv4_adress>"
)
OR
smartengine2 = unified.uApi(
user="<some_user>",
password="<some_password>",
ipv4_adress="<master_ipv4_adress>"
)
3 - Call desired method:
all_fixtures = smartengine1.get_all_fixtures()
print(all_fixtures)
>>> list of dictionaries
response = smartengine2.set_brightness(location=103, brightness=50)
print(response.status_code)
>>> 200
Documentation
- Developer Guide - Documentation for Developers
License
This Package is licensed under the MIT License
Metadata
Release files for smartengine 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| smartengine-0.2.0.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| smartengine-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.4 kB
Release files / smartengine-0.2.0.tar.gz
| Download URL | smartengine-0.2.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fb9925af9946869d0a2a18363042e98236bde30b615b86e10e5117593f848e5
|
|
BLAKE2b-256 checksum How to use checksums |
27435b2696c3655bdf4b208abea90a15958e0b799a40da489b7768be16f94acd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Release files / smartengine-0.2.0-py3-none-any.whl
| Download URL | smartengine-0.2.0-py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d44386bfcd86f977b5b83cdf511837f6768638a00f021e80ba88595a65d86d4
|
|
BLAKE2b-256 checksum How to use checksums |
7ed5aaae218cf5fe80f386f937323d501597fe5d8533a4e2c3a6aeaa6ac2fd5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|