Skip to main content

A small library that simplifies the use of the smartengines rAPI and uApi

Project description

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


License


This Package is licensed under the MIT License

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

smartengine-0.2.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smartengine-0.2.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file smartengine-0.2.0.tar.gz.

File metadata

  • Download URL: smartengine-0.2.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for smartengine-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8fb9925af9946869d0a2a18363042e98236bde30b615b86e10e5117593f848e5
MD5 105d5f74422dce26906674dd405a4c5c
BLAKE2b-256 27435b2696c3655bdf4b208abea90a15958e0b799a40da489b7768be16f94acd

See more details on using hashes here.

File details

Details for the file smartengine-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: smartengine-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for smartengine-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d44386bfcd86f977b5b83cdf511837f6768638a00f021e80ba88595a65d86d4
MD5 c969a7a04a90ede0a5b94bab9a6994f7
BLAKE2b-256 7ed5aaae218cf5fe80f386f937323d501597fe5d8533a4e2c3a6aeaa6ac2fd5b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page