skillfed

meshtastic

Python API & client shell for talking to Meshtastic devices

meshtastic v2.7.11 113.2K downloads/30d#12,350 on PyPI
Copyleft license GPL-3.0-only Active released

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 meshtastic

uv

uv add meshtastic

poetry

poetry add meshtastic

Installing 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

License :: OSI Approved :: GNU General Public License v3 (GPLv3)Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Tags

mesh radio communication pythonmeshtastic device controllora mesh networkingradio message apimesh network python librarydevice serial communicationpubsub radio events
mesh-networkingradio-communicationiot-devices

More Networking packages