Skip to main content

Python API & client shell for talking to Meshtastic devices

Project description

Meshtastic Logo

Meshtastic Python

A Python library and client for use with Meshtastic devices.

codecov PyPI - Downloads CI CLA assistant Fiscal Contributors GPL-3.0

Overview

This small library (and example application) provides an easy API for sending and receiving messages over mesh radios. It also provides access to any of the operations/data available in the device user interface or the Android application. Events are delivered using a publish-subscribe model, and you can subscribe to only the message types you are interested in.

Container usage

Container images are published to GHCR for this repository. The container entrypoint defaults to running meshtastic, so CLI flags can be passed directly:

docker run --rm ghcr.io/meshtastic/python --help

To run another command, pass it explicitly (for example, a shell):

docker run --rm -it --entrypoint /bin/sh ghcr.io/meshtastic/python

The container runs as a non-root user by default. When talking to local hardware, pass the serial device through explicitly (for example --device /dev/ttyUSB0:/dev/ttyUSB0) and ensure host device permissions allow access.

Call for Contributors

This library and CLI has gone without a consistent maintainer for a while, and there's many improvements that could be made. We're all volunteers here and help is extremely appreciated, whether in implementing your own needs or helping maintain the library and CLI in general.

If you're interested in contributing but don't have specific things you'd like to work on, look at the roadmap below!

Roadmap

This should always be considered a list in progress and flux -- inclusion doesn't guarantee implementation, and exclusion doesn't mean something's not wanted. GitHub issues are a great place to discuss ideas.

  • Types
    • type annotations throughout the codebase, and upgrading mypy running in CI to --strict
  • async-friendliness
  • CLI completeness & consistency
    • the CLI should support all features of the firmware
    • there should be a consistent output format available for shell scripting
  • CLI input validation & documentation
    • what arguments and options are compatible & incompatible with one another?
    • can the options be restructured in a way that is more self-documenting?
    • pubsub events should be documented clearly
  • helpers for third-party code
    • it should be easy to write a script that supports similar options to the CLI so many tools support the same ways of connecting to nodes
  • data storage & processing
    • there should be a standardized way of recording packets for later use, debugging, etc.
    • a persistence layer could also keep track of nodes beyond nodedb, as the apps do
    • a sqlite database schema and tools for writing to it may be a good starting point
    • enable maps, charts, visualizations

Stats

Alt

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meshtastic-2.7.11.tar.gz (376.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meshtastic-2.7.11-py3-none-any.whl (428.4 kB view details)

Uploaded Python 3

File details

Details for the file meshtastic-2.7.11.tar.gz.

File metadata

  • Download URL: meshtastic-2.7.11.tar.gz
  • Upload date:
  • Size: 376.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for meshtastic-2.7.11.tar.gz
Algorithm Hash digest
SHA256 41a8c84b577daff173d36db9fdbc8bf2c7228b58e580474e9f53802ed8ea7d4a
MD5 725dc1976eb8ef21a72a81c49521f1f2
BLAKE2b-256 de794c8d282e792f35b4895611a27b236153f3dac31f3d46e87f35fe46d6de7f

See more details on using hashes here.

File details

Details for the file meshtastic-2.7.11-py3-none-any.whl.

File metadata

  • Download URL: meshtastic-2.7.11-py3-none-any.whl
  • Upload date:
  • Size: 428.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for meshtastic-2.7.11-py3-none-any.whl
Algorithm Hash digest
SHA256 adb020f2cd7ace53896c6bf487f2d2136498dd88052c41a2aa6fb7a4634971b5
MD5 1b1519a01f9f2f091adc7d5be35e463d
BLAKE2b-256 868d8f89a75f195aca9241208f2fb26c76ea18d51f2e43fee252875ac4debc85

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page