meshtastic
Python API & client shell for talking to Meshtastic devices
What it is and what it does
Meshtastic is a Python interface to Meshtastic mesh radio devices, which are low-power LoRa-based radios that form self-healing mesh networks. The library wraps the device protocol and exposes it through a publish-subscribe event system, so you can subscribe to message types you care about and react to them in your code. It also provides a command-line tool that mirrors the capabilities of the official Android and device UI applications.
The library depends on bleak for Bluetooth communication, pyserial for USB/serial connections, protobuf for message serialization, and several utility libraries. It's designed to work with the device's native mesh protocol, so you can build applications that integrate mesh messaging into Python workflows—from simple scripts that relay messages to external systems, to more complex monitoring or logging applications.
Use it for:
- Build a Python script that receives mesh radio messages and logs them to a database or cloud service.
- Create a CLI tool that queries device status, node information, and mesh topology from connected Meshtastic radios.
- Integrate mesh messaging into a larger application using the publish-subscribe event model to react to incoming messages.
- Monitor mesh network health by subscribing to device telemetry and position updates from multiple nodes.
- Automate device configuration and firmware updates across a fleet of Meshtastic radios via serial or Bluetooth.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python library and CLI for communicating with Meshtastic mesh radio devices, sending and receiving messages, and accessing device operations through a publish-subscribe event model.
Yes, if you own or plan to use Meshtastic devices and need Python integration. The library is actively maintained, has low install friction, and provides both programmatic and CLI access to device functionality. The GPL-3.0 copyleft license is a hard blocker for proprietary projects; open-source or internal-use projects face no barrier. No known security vulnerabilities.
Install
meshtastic on PyPI
pip
pip install meshtasticuv
uv add meshtasticpoetry
poetry add meshtasticInstalling meshtastic
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a release 28 days ago. Supports Python 3.9 through 3.14. Eight runtime dependencies are all common, stable libraries (bleak, protobuf, pypubsub, pyserial, pyyaml, requests, packaging, tabulate).
License in practice
GPL-3.0-only copyleft license means any code that links this library must also be released under GPL-3.0 or a compatible license. Proprietary or permissively-licensed projects cannot use it without legal review.
Quickstart
pip install meshtastic
import meshtastic
import meshtastic.serial_interface
# Connect to device via serial
iface = meshtastic.serial_interface.SerialInterface()
# Define a callback for received messages
def on_receive(packet):
print(f"Received: {packet}")
# Subscribe to receive events
iface.on_receive = on_receive
# Send a message
iface.sendText("Hello mesh", destinationId=0xFFFFFFFF)
Requires a connected Meshtastic device accessible via serial port or Bluetooth; bleak (for Bluetooth) or pyserial (for USB/serial) must be able to communicate with the device.
Verify before relying
- Whether the library works with all Meshtastic device models and firmware versions currently in circulation.
- Performance characteristics when handling high message volumes or many simultaneous subscriptions.
- Stability of the async-friendliness roadmap item and whether async support is currently available.
Package facts
| License | GPL-3.0-only (copyleft) |
| Python support | supports the current Python release (<3.15,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — bleak, packaging, protobuf, pypubsub, pyserial, pyyaml, requests, tabulate |
| Maintenance | actively maintained — 28 days since the last release |
| First released | |
| Downloads | 113,227/month — #12,350 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: meshtastic-2.7.11-py3-none-any.whl
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
zigpy-xbeeEnables zigpy to communicate with XBee-based…
copyleft · top 15,000 on PyPI
zigpyzigpy is a hardware-independent Zigbee protocol…
copyleft · top 15,000 on PyPI
pymysensorsPython API for communicating with MySensors…
permissive · top 15,000 on PyPI
rf-protocolsDecodes and encodes radio frequency signals for…
permissive · top 15,000 on PyPI
zigpy-zigateProvides a Python 3 driver for ZiGate Zigbee…
copyleft · top 15,000 on PyPI
airthings-cloudA Python library for communicating with…
permissive · top 15,000 on PyPI
radiosAn async Python client for querying the Radio…
permissive · top 15,000 on PyPI
wiimwiim provides a Python API to discover,…
permissive · top 15,000 on PyPI
afsapiAsynchronous Python client for controlling…
permissive · top 15,000 on PyPI
google-cloud-pubsubPython client library for Google Cloud Pub/Sub,…
permissive · top 1,000 on PyPI