An API for PPMP, the Production Performance Management Protocol
Project description
This Python package is part of the Eclipse Unide Project and provides an API for generating, parsing and validating PPMP payloads. PPMP, the “Production Performance Management Protocol” is a simple, JSON-based protocol for message payloads in (Industrial) Internet of Things applications defined by the Eclipse IoT Working Group. Implementations for other programming languages are available from the Unide web site.
The focus of the Python implementation is ease of use for backend implementations, tools and for prototyping PPMP applications. Generating a simple payload and sending it over MQTT using Eclipse Paho is a matter of just a few lines:
import unide import paho.mqtt.client as mqtt client = mqtt.Client() client.connect("localhost", 1883, 60) device = unide.Device("Device-001") measurement = device.measurement(temperature=36.7) client.publish(topic="sample", measurement)
Installation
The latest version is available in the Python Package Index (PyPI) and can be installed using:
pip install unide-python
unide-python can be used with Python 2.7, 3.4, 3.5 and 3.6.
Source code, including examples and tests, is available on GitHub: https://github.com/eclipse/unide.python
To install the package from source:
git clone git@github.com:eclipse/unide.python.git cd unide.python python setup.py install
Contributing
This is a straightforward Python project, using setuptools and the standard setup.py mechanism. You can run the test suite using setup.py:
python setup.py test
There also is a top-level Makefile that builds a development environment and can run a couple of developer tasks. We aim for 100% test coverage and use tox to test against all supported Python releases. To run all tests against all supported Python versions, build the documentation locally and an installable wheel, you’ll require pyenv and a decent implementation of make. make all will create a virtualenv env in the project directory and install the necessary tools (see tools.txt).
For bug reports, suggestions and questions, simply open an issue in the Github issue tracker. We welcome pull requests.
Documentation
Detailed documentation is available on Read the Docs: http://unidepython.readthedocs.io/en/latest/.
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 Distributions
Built Distribution
File details
Details for the file unide_python-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: unide_python-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 829f61091b2828ac558f2b986984499d6276f9d54ecfc3da8b6c9694e2a8abb2 |
|
MD5 | ca67bcd536b3a4015f72f5fa53d36543 |
|
BLAKE2b-256 | d5afc90911d1da56a1ed0238338ba01068d43b8cd0137e9ca52b0f52a279f73e |