ThingsBoardLink
A high-level IoT platform interaction toolkit designed for Python developers
IoT Cloud Platform • Developer-Friendly • Production-Ready
🚀 Why ThingsBoardLink?
ThingsBoardLink is a powerful Python package designed to simplify integration with the ThingsBoard IoT platform. It encapsulates ThingsBoard's REST API, providing object-oriented interfaces that allow developers to easily manage devices, process telemetry data, control alarms, and other core functions.
✨ Key Features
| Feature | Description | Benefits | Documentation | Examples |
|---|---|---|---|---|
| 🔐 Auth Management | Auto JWT & session handling | Enhanced security, stateless auth | client_doc_en.md | 01_connect_and_auth.py |
| 📱 Device Management | Full device CRUD & credential ops | Easy lifecycle & access management | device_service_doc_en.md | 02_device_management.py |
| 📊 Telemetry Data | Upload, query & fetch history data | Efficient time-series data handling | telemetry_service_doc_en.md | 03_telemetry_data.py |
| ⚙️ Attribute Management | Client, server & shared attribute ops | Flexible metadata, dynamic config | attribute_service_doc_en.md | 04_attribute_management.py |
| 🚨 Alarm Management | Create, query, acknowledge & clear alarms | Timely response, system reliability | alarm_service_doc_en.md | 05_alarm_management.py |
| 🔄 RPC Calls | One-way & two-way remote procedure calls | Efficient device-cloud command interaction | rpc_service_doc_en.md | 06_rpc_calls.py |
| 🔗 Relation Management | Create & manage entity relations | Build topology, complex logic | relation_service_doc_en.md | 07_entity_relations.py |
🚀 Quick Start
Installation
# Install from PyPI
pip install thingsboardlink
# Or install with development dependencies
pip install thingsboardlink[dev]
30-Second Demo
from thingsboardlink import ThingsBoardClient
# Connect to the corresponding cloud platform
with ThingsBoardClient(
base_url="http://localhost:8080",
username="tenant@thingsboard.org",
password="tenant"
) as client:
# Device ID
device_id = "MY_DEVICE_ID"
# Retrieve telemetry data for the corresponding device
value = client.telemetry_service.get_latest_telemetry(device_id)
print(value)
📁 Project Architecture
ThingsBoardLink/
├── src/thingsboardlink/
│ ├── services/ # 🛠️ Service module package
│ │ ├── device_service.py # Device service module
│ │ ├── telemetry_service.py # Telemetry service module
│ │ ├── attribute_service.py # Attribute service module
│ │ ├── alarm_service.py # Alarm service module
│ │ ├── rpc_service.py # RPC service module
│ │ └── relation_service.py # Relation service module
│ │
│ ├── client.py # 🖥️ Core client module
│ ├── exceptions.py # 🔧 Exception handling module
│ └── models.py # 🚚 Data model module
│
├── examples/ # 📚 Usage examples
│ ├── 01_connect_and_auth.py # Connection and authentication example
│ ├── 02_device_management.py # Device management example
│ ├── 03_telemetry_data.py # Telemetry data example
│ ├── 04_attribute_management.py # Attribute management example
│ ├── 05_alarm_management.py # Alarm management example
│ ├── 06_rpc_calls.py # RPC call example
│ └── 07_entity_relations.py # Relation management example
│
└── docs/ # 📜 Documentation
├── zh # Chinese - Documentation
└── en # English - Documentation
Metadata
Release files for thingsboardlink 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| thingsboardlink-1.2.0.tar.gz | 28.4 kB | Without provenance | Details for thingsboardlink-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| thingsboardlink-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for thingsboardlink-1.2.0-py3-none-any.whl |
Total release size: 61.4 kB
Release files / thingsboardlink-1.2.0.tar.gz
| Download URL | thingsboardlink-1.2.0.tar.gz |
|---|---|
| Size | 28.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c10adac1d6f5a23f35a9d361d02e91b79bf2d1cd7436ff8c07a4fc562db7923d
|
|
BLAKE2b-256 checksum How to use checksums |
f7643e2eca32730fe9a2bfa7c07872e404def49d016ffee45624bf9716597778
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / thingsboardlink-1.2.0-py3-none-any.whl
| Download URL | thingsboardlink-1.2.0-py3-none-any.whl |
|---|---|
| Size | 33.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6595475a4bec005db35d1fbb4107f8220a19cee36ba2a1f8016befcc416eaf7e
|
|
BLAKE2b-256 checksum How to use checksums |
bf91cdb4683db83afa9e8bc55f767ba295fb95a7376f9341bf795fe024ea28e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for thingsboardlink 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.