Skip to main content

Sensor network simulator publishing to MQTT broker

Project description

PashehNet

Provides a simulated sensor network (SSN) framework for publishing to a target system. The package implements both an API and command line interface to provide this service.

This README is intentionally short for tl;dr purposes. Full documentation can be found here.

Installation

If available from a package repository:

pip install pashehnet

Otherwise you can install directly from the GitHub repo:

pip install git+https://github.com/zaggyai/pashehnet

Contributing

First, fork the repo if not a current maintainer, or clone if you are! :)

Make sure your virtual env is up-to-date:

pip install --upgrade pip wheel setuptools

Install package in dev/editable mode:

pip install -e .

Install dev environment dependencies such as pytest, flake8 and supporting deps for tests:

pip install -r dev-requirements.txt

Keep in mind that even if you already have a virtualenv configured from a previous fork/clone, its dependencies could be out of date so re-running the installs should bring your virtualenv current.

Environment

You can leverage environment variables within code or CLI config files for sensitive data you don't want to check into a repo. This is always a going concern for any code that requires client/server configuration. Please be careful to never add security credentials to a commit as they're nearly impossible to permanently remove from a repo after the fact.

For MQTT broker config, we typically define the following env vars and use them in our code/configs:

  • MQTT_HOST
  • MQTT_PORT
  • MQTT_USER
  • MQTT_PWD

We like the cross-platform direnv tool and have a gitignore exclusion for its files, but you do you! :upside_down_face:

Opening a Pull Request (PR)

Pull requests are a git workflow for managing branch merges with reviews and tests. You can read more about them in the GitHub docs. Before opening a PR please make sure the following commands complete locally without errors in your local dev environment as they will block a PR if not:

# Run linter
flake8 src/ tests/

# Run all unit tests
# Note we disable deprecation warnings for the time being;
# there's a method to the madness
pytest -W ignore::DeprecationWarning

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

pashehnet-0.1.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

pashehnet-0.1.0-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file pashehnet-0.1.0.tar.gz.

File metadata

  • Download URL: pashehnet-0.1.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for pashehnet-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9948ff76e6de71df3c8b4de47a508b4ee8101470e8260aba96d0650d26c24e74
MD5 4d5b008026d060e21e52737c61268bc5
BLAKE2b-256 3284bb7cd5643c89b3b4a75c1d082b902464e35d76af735933de38a581f823fb

See more details on using hashes here.

File details

Details for the file pashehnet-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pashehnet-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for pashehnet-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17dd29bbd7fd69b9af075938ca41f5edd79db9374a860d47095d1f830be213e2
MD5 feb7217840c564c1c8e970f3ae67cb05
BLAKE2b-256 1065aaaa85baceb9ec664f5f4ab0803b31bdf9802d92fe4987d07c3071db2b1b

See more details on using hashes here.

Supported by

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