Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Wirepas Mesh Messaging

This Python wheel contains the generated code to interact with Wirepas Mesh Network through the Gateway to Backend API. It offers an easy way to use the API in Python without the need to build the protobuf files yourself

Installation

Install from PyPi

This package is available from PyPi.

    pip install wirepas-mesh-messaging

From the source

This wheel can be built from source directly. You need to have protobuf compiler installed.

First, .proto files should be compiled

protoc -I backend-apis/gateway_to_backend/protocol_buffers_files/ \
    --python_out=./wirepas_mesh_messaging/proto \
     backend-apis/gateway_to_backend/protocol_buffers_files/*.proto

After that, the wheel can be built using build.

python3 -m build .

Note: When installing the package, protobuf is installed automatically as a dependency. On some environments (such as Alpine) the recommended UPB backend might not available as a binary and the system might use the slower python implementation. To get the UBP backend, you can configure pip to use the source version of protobuf. This way the UPB backend would be built when installing protobuf:

pip install . --no-binary protobuf

Usage example

Create a message to be sent to a Gateway in protobuf format

>>> import wirepas_mesh_messaging as wmm

>>> downlink_message = wmm.SendDataRequest(dest_add=1234, src_ep=10, dst_ep=10, qos=0, payload=bytes.fromhex("0102ABCD"))

# downlink_message.payload can be published on right topic (protobuf formatted)
>>> downlink_message.payload
b'\n\x1e2\x1c\n\x0b\x08\x8e\xac\x9c\xbf\xab\x95\xbd\xf6\xfe\x01\x10\xd2\t\x18\n \n(\x002\x04\x01\x02\xab\xcd'

Parse a Wirepas message received from a Gateway in protobuf format

>>> import wirepas_mesh_messaging as wmm

# payload is the payload received from mqtt (protobuf formatted)
# Let's assume it was created like this on Gateway side:
# wmm.ReceivedDataEvent(gw_id="Gw1", sink_id="sink0", rx_time_ms_epoch=1608644981000, src=1234, dst=1, src_ep=10, dst_ep=10, travel_time_ms=128, qos=1).payload

>>> uplink_message = wmm.ReceivedDataEvent.from_payload(payload)

>>> print(uplink_message)
{'gw_id': 'Gw1', 'sink_id': 'sink0', 'event_id': 12527549978202166391, 'rx_time_ms_epoch': 1608644981000, 'source_address': 1234, 'destination_address': 1, 'source_endpoint': 10, 'destination_endpoint': 10, 'travel_time_ms': 128, 'qos': 1, 'data_payload': None, 'data_size': None, 'hop_count': 0}

Services API documentation

Please refer to the backend apis repository for documentation on the Gateway to Backend API.

License

Licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Metadata

Release files for wirepas-mesh-messaging 1.5.0rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wirepas-mesh-messaging 1.5.0rc1
File Size Uploaded Provenance Actions
wirepas_mesh_messaging-1.5.0rc1.tar.gz 34.8 kB Without provenance Details for wirepas_mesh_messaging-1.5.0rc1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wirepas-mesh-messaging 1.5.0rc1
File Interpreter ABI Platform Actions
wirepas_mesh_messaging-1.5.0rc1-py3-none-any.whl Python 3 none any Details for wirepas_mesh_messaging-1.5.0rc1-py3-none-any.whl

Total release size: 80.3 kB

Release files / wirepas_mesh_messaging-1.5.0rc1.tar.gz

Download URL wirepas_mesh_messaging-1.5.0rc1.tar.gz
Size 34.8 kB
Tags Source
SHA-256 checksum
How to use checksums
329bbc66a59cc61ac080240523b73140775bae795126152a33f807d10c905ae4
BLAKE2b-256 checksum
How to use checksums
ce878d703a3273d655f6499686827f3a3f1bbc6034fd0ced5b145f2b1cc6820f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Release files / wirepas_mesh_messaging-1.5.0rc1-py3-none-any.whl

Download URL wirepas_mesh_messaging-1.5.0rc1-py3-none-any.whl
Size 45.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7662ae3f1d1cd778c860d1cb2566f5a6458199cdfbd26e53d1c522687fbc6b9
BLAKE2b-256 checksum
How to use checksums
529de405f95bc0eeff74df63d18d02131d1d5ab0341b25f278df970858cb6670
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Security for wirepas-mesh-messaging 1.5.0rc1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page