Skip to main content

A python package for managing a Meshtastic node database.

Project description

meshdb

A lightweight Python library for storing Meshtastic node, telemetry, and message data in per-node SQLite databases.

Installation

Install from source within a virtual environment:

git clone https://github.com/pdxlocations/meshdb.git
cd meshdb
pip install -e .

Or install via Poetry:

poetry install

Quick Usage Example

Set a default database path and handle incoming packets:

from meshdb import handle_packet, set_default_db_path

set_default_db_path("./data")

packet = {
    "from": 12345678,
    "rxTime": 1700000000,
    "decoded": {
        "portnum": "NODEINFO_APP",
        "user": {"longName": "TestNode"}
    }
}

handle_packet(packet, node_database_number=12345678)

Viewing Stored Data

You can run:

python -m meshdb --db ./data

This prints a JSON summary of all known nodes and their latest telemetry, if available.

Lookups in Code

import meshdb

node = meshdb.get_node(12345678, owner_node_num=12345678)
battery = meshdb.get_node_metric("TestNode", "battery_level", owner_node_num=12345678)

Project Status

Early development. Schema and API changes may occur.

Project details


Download files

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

Source Distribution

meshdb-0.1.2.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

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

meshdb-0.1.2-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

Details for the file meshdb-0.1.2.tar.gz.

File metadata

  • Download URL: meshdb-0.1.2.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for meshdb-0.1.2.tar.gz
Algorithm Hash digest
SHA256 49a890bcfd5eb6828c315de1cb8339326199085f083ec48a31d6d8be1d39857f
MD5 0ed1628b67b483852e67dbbb73369667
BLAKE2b-256 34fe6327ae9fe6da0095f113c88f34f6a1648dc29a746e04882e743fd39f376f

See more details on using hashes here.

Provenance

The following attestation bundles were made for meshdb-0.1.2.tar.gz:

Publisher: release.yaml on pdxlocations/meshdb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meshdb-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: meshdb-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 31.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for meshdb-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 def3309b90b832cff869a2c25ed197b5cf3536f489b5a2ab7748107d4de644ef
MD5 06683afaabf19000c89d93176676fd7a
BLAKE2b-256 577c312a6e93eaed6fe47409c9b729d01a0b37a7e97a6bc9365a1702d8772084

See more details on using hashes here.

Provenance

The following attestation bundles were made for meshdb-0.1.2-py3-none-any.whl:

Publisher: release.yaml on pdxlocations/meshdb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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