Skip to main content

A library for interfacing to Tartabit IoT Bridge

Project description

iotb-py

This package provides some useful scripts for interacting with the Tartabit IoT Bridge from Python.

It implements the REST API that is available here: https://bridge-us.tartabit.com/swaggerui/

This package is expected to change frequently, and may be replaced by a formal python SDK in the future.

Using the client

from client import IotbClient

# authenticating with an application token
client = IotbClient("https://bridge-us.tartabit.com/api/v1/", token="AT:adfasdf....asdfasd")

# authenticating with a username and password
client = IotbClient("https://bridge-us.tartabit.com/api/v1/", username="user@domain.com", password="password")

resp = client.request("GET", "log", query={"limit": 20})

Utilities

download-logs.py

This utility downloads application logs from an instance of the IoT Bridge and saves them to a JSON file.

python download-logs.py -u "https://bridge-us.tartabit.com/api/v1" -t "AT:xxxx" -d 30 -q "level == \"warn\""
  • -u: The URL used to access the IoT Bridge API.
  • -t: The application token used to authenticate with the IoT Bridge.
  • -d: The number of days of logs to download.
  • -q: A query string used to filter the logs. Quotes must be escaped with '\'.

trigger-comparison.py

THis utility compares the triggers in two accounts and generates a file diff.txt with the differences between the two accounts.

python trigger-comparison.py --url1="https://bridge-us.tartabit.com/api/v1/" --url2="https://bride-us.armordata.io/api/v1/" --token1="AT:YYY" --token2="AT:XXX"

License

Mozilla Public License Version 2.0

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

pyiotb-0.1.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

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

pyiotb-0.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file pyiotb-0.1.0.tar.gz.

File metadata

  • Download URL: pyiotb-0.1.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pyiotb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4c15607ddd4d9cb7c597d4f450e1e9a81860c833631aec3840212b64deb4fe46
MD5 9ed6e36cf74ec0112021884c7dcc23b6
BLAKE2b-256 afa44ab8e584f6f7635817b3e5bdce1cbf1cab3728aa964c3b59a82dcf8f0138

See more details on using hashes here.

File details

Details for the file pyiotb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyiotb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pyiotb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de93905851beadbaf06759be0ea700d4dc6e8c9aec842a316faee4a9d23bced9
MD5 53e285196aa98a6873f053c045c0d4cb
BLAKE2b-256 acc9d32b293385a22f1bf0061c4fcdafd008f04a8be5d83720e7c10e12aa5ddd

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