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 --strictclean out of the box; shipspy.typed. - Mandatory redaction. No password, token, refresh-token, cookie,
or
Authorizationheader 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
- Compound workflows · Reports · Floorplans
- Error handling · Scope switching · Pagination
- Rate limiting · Timestamps · Credential rotation
Advanced
Reference
- Migrating from the JS client
- API reference — auto-generated from docstrings via mkdocstrings.
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.createno longer accepts the silently-strippedmac_addressargument). SeeCHANGELOG.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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rtls_sdk-0.4.0.tar.gz.
File metadata
- Download URL: rtls_sdk-0.4.0.tar.gz
- Upload date:
- Size: 104.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5be60d8e43bcdba187e85b4c8cd616aafbae9ba5a983877e3b6542d6b994f45a
|
|
| MD5 |
a7084f6f62b32aa1591a15c9115afa30
|
|
| BLAKE2b-256 |
1c5eefb93e425a26ea1d20d25fa7b0efb1ad794dfab0aa54417218272caf89a5
|
File details
Details for the file rtls_sdk-0.4.0-py3-none-any.whl.
File metadata
- Download URL: rtls_sdk-0.4.0-py3-none-any.whl
- Upload date:
- Size: 139.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f6946254c8d18e1c7f50fa4f3da4e1d50130749cf4845f0d1c4aa3860af781a
|
|
| MD5 |
c0048e31e7fe5630f36724b127521c17
|
|
| BLAKE2b-256 |
bb3406602705c72bbbfba692bf0f8ae117f14252a15449e7317b81bde492f85c
|