Skip to main content

BindThings Python

Official Python client for the BindThings IoT Platform.

Installation

pip install bindthings

Quick Start

from bindthings import BindThings

bt = BindThings("YOUR_DEVICE_TOKEN")
bt.connect()
bt.send({"temperature": 25.5, "humidity": 60})

API Reference

Constructor

bt = BindThings(token, client_id=None)

Connect

bt.connect()              # Background thread (non-blocking)
bt.connect(blocking=True) # Foreground (blocking)

Send Telemetry

bt.send({"temperature": 25.5})
bt.send({"temperature": 25.5, "humidity": 60, "pressure": 1013})

Receive Commands

def on_command(payload: str):
    import json
    data = json.loads(payload)
    print(data)

bt.on_command(on_command)

Status

bt.set_online(True)   # Mark device as online
bt.set_online(False)  # Mark device as offline
bt.is_connected()     # Check connection
bt.disconnect()       # Graceful disconnect

Examples

Example Description
basic.py Send temperature and humidity every 15 seconds
dht22.py Read DHT22 on Raspberry Pi and send to BindThings

Connection Details

Parameter Value
Broker mqtt.bindthings.io
Port 8883 (TLS)
Username Your Device Token
Password Your Device Token

License

MIT License — © 2025 BindThings

Metadata

Release files for bindthings 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bindthings 1.0.0
File Size Uploaded Provenance Actions
bindthings-1.0.0.tar.gz 3.7 kB Without provenance Details for bindthings-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bindthings 1.0.0
File Interpreter ABI Platform Actions
bindthings-1.0.0-py3-none-any.whl Python 3 none any Details for bindthings-1.0.0-py3-none-any.whl

Total release size: 7.6 kB

Release files / bindthings-1.0.0.tar.gz

Download URL bindthings-1.0.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d61d5c1e4c577bc19ba4d25c4d5e24e7041425033a9bd90e84b0c3ba8ae92593
BLAKE2b-256 checksum
How to use checksums
49c0feaeb1e50c33519ce512b1a84eadce80fbcf8706e967ce03cfddc4db4a7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / bindthings-1.0.0-py3-none-any.whl

Download URL bindthings-1.0.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
896ec5c66c38034355beecbe692221842730d62ead10ba77cb461b9e70447c97
BLAKE2b-256 checksum
How to use checksums
f2f12f871da41997c654bcce3f6b059b524a17cbf078759c2e45e5a7c36b6219
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for bindthings 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page