The Things Network_python_client
A python client to fetch/receive and parse uplink messages from The Things Network
It is used primarily for the home-assistant integration but it should also work independently - check the testcases.
Assumptions
For this library to work, the TheThingNetwork storage plugin is required. You might also check the home assistant prerequisites as they also apply when this library is used standalone.
A payload decoded needs to be present so that you have a decoded_payload in the uplink message. By default, this library expects the decoded_payload to have a key-value format such as:
"decoded_payload": {
"accelerometer_77": {
"x": 1, # Sensor will be called accelerometer_77_x
"y": 0.5, # Sensor will be called accelerometer_77_y
"z": 9.8 # Sensor will be called accelerometer_77_z
},
"voltage": 3.1, # Sensor will be called voltage and be of type float
"boolean_1": true, # Binary Sensor will be called boolean_1
"digital_in_1": 8, # Sensor will be called voltage and be of type int
"gps_34": { # Device Tracker will be called gps_34
"latitude": 48.76826575,
"longitude": 9.1596689,
"altitude": 310
}
}
If you have a device using a different format, please open an Issue and post a copy of full message for your device.
Supported devices
How to test
This library uses tox so just install it and run tox
Thanks
This package structure and pipeline is derived from the zwave-js-server-python package.
Metadata
Release files for ttn-client 1.3.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 | |
|---|---|---|---|
| ttn_client-1.3.0.tar.gz | 15.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ttn_client-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.5 kB
Release files / ttn_client-1.3.0.tar.gz
| Download URL | ttn_client-1.3.0.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14c61bbc7c8f3f377b98aeabc84f73e568a1a5906e10c55ab3d13dbe76e7c80e
|
|
BLAKE2b-256 checksum How to use checksums |
2b8da8bc8709f1b4af0901c191f8d07849be6245b72c3a9971da3afe383c8dc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency logRelease files / ttn_client-1.3.0-py3-none-any.whl
| Download URL | ttn_client-1.3.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a612b331fb68eff11b2186f39bfd57e08ac95abd41a70e8fbb3ac8feec8e8bfd
|
|
BLAKE2b-256 checksum How to use checksums |
cf8967a22a7a4d68c2a902701721c804eafca99129d54245690e077faa16e13e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency log