Skip to main content

Python SDK for the RTLS REST API

Project description

RTLS SDK

A Python SDK for the RTLS REST API. Three-step usage:

from rtls_sdk import RtlsClient

client = RtlsClient.from_env()
tags = client.tags.list()

That's it — token, refresh, scoping headers, 401 re-login are all internal. The first method call performs a lazy login; subsequent calls reuse the session.

What you get

  • Compound workflows. One Python call replaces the multi-call REST sagas the JS reference client makes you script — e.g. tags.create(name="X", attached_zone="Z", groups=[...]) runs the three-step create-and-attach with rollback on partial failure.
  • One exception hierarchy. Everything under RtlsError: NotFound, ValidationError, RateLimited, ServerError, PartialFailureError, ReportFailed / ReportTimeout, …
  • Typed models. Pydantic v2 under the hood; mypy --strict clean out of the box; ships py.typed.
  • Mandatory redaction. No password, token, refresh-token, cookie, or Authorization header ever reaches a log handler. There is no opt-out flag.
  • Sync-only for v1. Async surface and WebSocket support are on the v2 roadmap.

Install

pip install rtls-sdk

Python 3.10+ supported. See docs/install.md for dev install and verification.

Quickstart

export RTLS_USERNAME="qa@example.com"
export RTLS_PASSWORD="hunter2"
export RTLS_BASE_URL="https://rtls.example.com"
from rtls_sdk import RtlsClient

with RtlsClient.from_env() as client:
    for tag in client.tags.list():
        print(tag.uid, tag.name)

For the full 5-minute walkthrough see docs/quickstart.md.

Documentation

The full docs site (mkdocs build):

Start here

  • Entity catalog — one page per entity (tags, sites, areas, floorplans, anchors, zones, nodes, users, reports, …) with methods, examples, and model fields. The fastest path to "what can I do with X?".
  • Install · Quickstart

Cross-cutting guides

Advanced

Reference

Build locally:

pip install -e ".[docs]"
mkdocs serve

Status

v0.2.0 — adds M9 places CRUD (sites / areas / anchors), M10 floorplans

  • image lifecycle, M11 entity-oriented documentation reorganisation, and M12 schema-audit fixes (canonical bare-12-hex MACs; tags.create no longer accepts the silently-stripped mac_address argument). See CHANGELOG.md.

License

MIT — see 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

rtls_sdk-0.3.0.tar.gz (95.0 kB view details)

Uploaded Source

Built Distribution

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

rtls_sdk-0.3.0-py3-none-any.whl (128.1 kB view details)

Uploaded Python 3

File details

Details for the file rtls_sdk-0.3.0.tar.gz.

File metadata

  • Download URL: rtls_sdk-0.3.0.tar.gz
  • Upload date:
  • Size: 95.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for rtls_sdk-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2be427be04e9075866ee60529f4612e0a57cc82193caaf948a381e9a52fda483
MD5 9e0d0a458761079eb36cb51c7904c48a
BLAKE2b-256 2aaf4f3eb61e6953b73f5058736f2d795a210a487e00ebe37288ac9d2a81742a

See more details on using hashes here.

File details

Details for the file rtls_sdk-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: rtls_sdk-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 128.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for rtls_sdk-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e727744457c3d2dc4a9c7adcb4aa8ade8f474fa92c603094cf61bfdd557566fb
MD5 104dd3f2933a2eb0d59d24841f57b592
BLAKE2b-256 cf9c1e4f3f04891cddeaa9dbb7a664c4e2deb9221db6127fa0265baf2306f539

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