# ThingsBoardLink
<div align="center">
[](pepy.tech/projects/thingsboardlink)
[](badge.fury.io/py/thingsboardlink)
[](pypi.org/project/thingsboardlink/)
[](LICENSE)
**A high-level IoT platform interaction toolkit designed for Python developers**
*IoT Cloud Platform • Developer-Friendly • Production-Ready*
[Chinese](README-zh_CN.md) | [Documentation](docs/en) | [Examples](#examples)
</div>
---
## 🚀 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](docs/en/client_en.md) | [01_connect_and_auth.py](examples/01_connect_and_auth.py) |
| 📱 **Device Management** | Full device CRUD & credential ops | Easy lifecycle & access management | [device_service_doc_en.md](docs/en/services/device_service_en.md) | [02_device_management.py](examples/02_device_management.py) |
| 📊 **Telemetry Data** | Upload, query & fetch history data | Efficient time-series data handling | [telemetry_service_doc_en.md](docs/en/services/telemetry_service_en.md) | [03_telemetry_data.py](examples/03_telemetry_data.py) |
| ⚙️ **Attribute Management** | Client, server & shared attribute ops | Flexible metadata, dynamic config | [attribute_service_doc_en.md](docs/en/services/attribute_service_en.md) | [04_attribute_management.py](examples/04_attribute_management.py) |
| 🚨 **Alarm Management** | Create, query, acknowledge & clear alarms | Timely response, system reliability | [alarm_service_doc_en.md](docs/en/services/alarm_service_en.md) | [05_alarm_management.py](examples/05_alarm_management.py) |
| 🔄 **RPC Calls** | One-way & two-way remote procedure calls | Efficient device-cloud command interaction | [rpc_service_doc_en.md](docs/en/services/rpc_service_en.md) | [06_rpc_calls.py](examples/06_rpc_calls.py) |
| 🔗 **Relation Management** | Create & manage entity relations | Build topology, complex logic | [relation_service_doc_en.md](docs/en/services/relation_service_en.md) | [07_entity_relations.py](examples/07_entity_relations.py) |
## 🚀 Quick Start
### Installation
```bash
# Install from PyPI
pip install thingsboardlink
# Or install with development dependencies
pip install thingsboardlink[dev]
```
### 30-Second Demo
```python
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
```
Raw data
{
"_id": null,
"home_page": null,
"name": "thingsboardlink",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "iot, thingsboard, rpc, python-sdk, telemetry, internet-of-things, api-client, sensor-data",
"author": null,
"author_email": "Miraitowa-la <2056978412@qq.com>",
"download_url": "https://files.pythonhosted.org/packages/f7/64/3e2eca32730fe9a2bfa7c07872e404def49d016ffee45624bf9716597778/thingsboardlink-1.2.0.tar.gz",
"platform": null,
"description": "# ThingsBoardLink\r\n\r\n<div align=\"center\">\r\n\r\n[](pepy.tech/projects/thingsboardlink)\r\n[](badge.fury.io/py/thingsboardlink)\r\n[](pypi.org/project/thingsboardlink/)\r\n[](LICENSE)\r\n\r\n**A high-level IoT platform interaction toolkit designed for Python developers**\r\n\r\n*IoT Cloud Platform \u2022 Developer-Friendly \u2022 Production-Ready*\r\n\r\n[Chinese](README-zh_CN.md) | [Documentation](docs/en) | [Examples](#examples)\r\n\r\n</div>\r\n\r\n---\r\n\r\n## \ud83d\ude80 Why ThingsBoardLink?\r\n\r\nThingsBoardLink 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.\r\n\r\n### \u2728 Key Features\r\n\r\n| **Feature** | **Description** | **Benefits** | **Documentation** | **Examples** |\r\n|-----------------------------|-------------------------------------------|--------------------------------------------|-------------------------------------------------------------------------|-------------------------------------------------------------------|\r\n| \ud83d\udd10 **Auth Management** | Auto JWT & session handling | Enhanced security, stateless auth | [client_doc_en.md](docs/en/client_en.md) | [01_connect_and_auth.py](examples/01_connect_and_auth.py) |\r\n| \ud83d\udcf1 **Device Management** | Full device CRUD & credential ops | Easy lifecycle & access management | [device_service_doc_en.md](docs/en/services/device_service_en.md) | [02_device_management.py](examples/02_device_management.py) |\r\n| \ud83d\udcca **Telemetry Data** | Upload, query & fetch history data | Efficient time-series data handling | [telemetry_service_doc_en.md](docs/en/services/telemetry_service_en.md) | [03_telemetry_data.py](examples/03_telemetry_data.py) |\r\n| \u2699\ufe0f **Attribute Management** | Client, server & shared attribute ops | Flexible metadata, dynamic config | [attribute_service_doc_en.md](docs/en/services/attribute_service_en.md) | [04_attribute_management.py](examples/04_attribute_management.py) |\r\n| \ud83d\udea8 **Alarm Management** | Create, query, acknowledge & clear alarms | Timely response, system reliability | [alarm_service_doc_en.md](docs/en/services/alarm_service_en.md) | [05_alarm_management.py](examples/05_alarm_management.py) |\r\n| \ud83d\udd04 **RPC Calls** | One-way & two-way remote procedure calls | Efficient device-cloud command interaction | [rpc_service_doc_en.md](docs/en/services/rpc_service_en.md) | [06_rpc_calls.py](examples/06_rpc_calls.py) |\r\n| \ud83d\udd17 **Relation Management** | Create & manage entity relations | Build topology, complex logic | [relation_service_doc_en.md](docs/en/services/relation_service_en.md) | [07_entity_relations.py](examples/07_entity_relations.py) |\r\n\r\n## \ud83d\ude80 Quick Start\r\n\r\n### Installation\r\n\r\n```bash\r\n# Install from PyPI\r\npip install thingsboardlink\r\n\r\n# Or install with development dependencies\r\npip install thingsboardlink[dev]\r\n```\r\n\r\n### 30-Second Demo\r\n```python\r\nfrom thingsboardlink import ThingsBoardClient\r\n\r\n# Connect to the corresponding cloud platform\r\nwith ThingsBoardClient(\r\n base_url=\"http://localhost:8080\",\r\n username=\"tenant@thingsboard.org\",\r\n password=\"tenant\"\r\n) as client:\r\n # Device ID\r\n device_id = \"MY_DEVICE_ID\"\r\n \r\n # Retrieve telemetry data for the corresponding device\r\n value = client.telemetry_service.get_latest_telemetry(device_id)\r\n print(value)\r\n```\r\n\r\n## \ud83d\udcc1 Project Architecture\r\n\r\n```\r\nThingsBoardLink/\r\n\u251c\u2500\u2500 src/thingsboardlink/\r\n\u2502 \u251c\u2500\u2500 services/ # \ud83d\udee0\ufe0f Service module package\r\n\u2502 \u2502 \u251c\u2500\u2500 device_service.py # Device service module\r\n\u2502 \u2502 \u251c\u2500\u2500 telemetry_service.py # Telemetry service module\r\n\u2502 \u2502 \u251c\u2500\u2500 attribute_service.py # Attribute service module\r\n\u2502 \u2502 \u251c\u2500\u2500 alarm_service.py # Alarm service module\r\n\u2502 \u2502 \u251c\u2500\u2500 rpc_service.py # RPC service module\r\n\u2502 \u2502 \u2514\u2500\u2500 relation_service.py # Relation service module\r\n\u2502 \u2502\r\n\u2502 \u251c\u2500\u2500 client.py # \ud83d\udda5\ufe0f Core client module\r\n\u2502 \u251c\u2500\u2500 exceptions.py # \ud83d\udd27 Exception handling module\r\n\u2502 \u2514\u2500\u2500 models.py # \ud83d\ude9a Data model module\r\n\u2502\r\n\u251c\u2500\u2500 examples/ # \ud83d\udcda Usage examples\r\n\u2502 \u251c\u2500\u2500 01_connect_and_auth.py # Connection and authentication example\r\n\u2502 \u251c\u2500\u2500 02_device_management.py # Device management example\r\n\u2502 \u251c\u2500\u2500 03_telemetry_data.py # Telemetry data example\r\n\u2502 \u251c\u2500\u2500 04_attribute_management.py # Attribute management example\r\n\u2502 \u251c\u2500\u2500 05_alarm_management.py # Alarm management example\r\n\u2502 \u251c\u2500\u2500 06_rpc_calls.py # RPC call example\r\n\u2502 \u2514\u2500\u2500 07_entity_relations.py # Relation management example\r\n\u2502\r\n\u2514\u2500\u2500 docs/ # \ud83d\udcdc Documentation\r\n \u251c\u2500\u2500 zh # Chinese - Documentation\r\n \u2514\u2500\u2500 en # English - Documentation\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "\u4e00\u4e2a\u4e13\u4e3a Python \u5f00\u53d1\u8005\u8bbe\u8ba1\u7684\u9ad8\u7ea7 IoT \u5e73\u53f0\u4ea4\u4e92\u5de5\u5177\u5305 | A high-level IoT platform interaction toolkit designed for Python developers",
"version": "1.2.0",
"project_urls": {
"Homepage": "https://github.com/Miraitowa-la/ThingsBoardLink",
"Issues": "https://github.com/Miraitowa-la/ThingsBoardLink/issues",
"Repository": "https://github.com/Miraitowa-la/ThingsBoardLink"
},
"split_keywords": [
"iot",
" thingsboard",
" rpc",
" python-sdk",
" telemetry",
" internet-of-things",
" api-client",
" sensor-data"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "bf91cdb4683db83afa9e8bc55f767ba295fb95a7376f9341bf795fe024ea28e7",
"md5": "affc80558c6ca7209e4f780994b04b8c",
"sha256": "6595475a4bec005db35d1fbb4107f8220a19cee36ba2a1f8016befcc416eaf7e"
},
"downloads": -1,
"filename": "thingsboardlink-1.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "affc80558c6ca7209e4f780994b04b8c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 33011,
"upload_time": "2025-09-08T12:50:20",
"upload_time_iso_8601": "2025-09-08T12:50:20.567903Z",
"url": "https://files.pythonhosted.org/packages/bf/91/cdb4683db83afa9e8bc55f767ba295fb95a7376f9341bf795fe024ea28e7/thingsboardlink-1.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f7643e2eca32730fe9a2bfa7c07872e404def49d016ffee45624bf9716597778",
"md5": "81ecf0a01861a7509e760526626d8a63",
"sha256": "c10adac1d6f5a23f35a9d361d02e91b79bf2d1cd7436ff8c07a4fc562db7923d"
},
"downloads": -1,
"filename": "thingsboardlink-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "81ecf0a01861a7509e760526626d8a63",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 28356,
"upload_time": "2025-09-08T12:50:21",
"upload_time_iso_8601": "2025-09-08T12:50:21.920575Z",
"url": "https://files.pythonhosted.org/packages/f7/64/3e2eca32730fe9a2bfa7c07872e404def49d016ffee45624bf9716597778/thingsboardlink-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-08 12:50:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Miraitowa-la",
"github_project": "ThingsBoardLink",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "thingsboardlink"
}