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.1.tar.gz (9.9 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.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyiotb-0.1.1.tar.gz
  • Upload date:
  • Size: 9.9 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.1.tar.gz
Algorithm Hash digest
SHA256 ebdb60666ed4a06cbe6e20ac74af25a0232c4cd07a9401964eb27fa2091c375f
MD5 9a8189859e64b21a34938c1d4a7fa3b6
BLAKE2b-256 34460a27beeafcdcb8865e6d814196fd117fcb84357ecc14107406f388a9ace9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyiotb-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ecabce8d326a04cdba3563f8b3bb4c183e50b887fd974646518d808f83928797
MD5 d60129a77d907e17778ed3c423aca4a2
BLAKE2b-256 e9ebc1be64afe5d4f6004db693070e5d0b63c10bdce773bfaba695380d71e8aa

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