PySoMQ: Python bindings for serial over ØMQ
This package utilizes the Python bindings of ØMQ in order to provide a lightweight and fast serial bidirectional PySerial communication interface.
Getting started
Install the package from Pypi
pip install pysomq
Run as permanent streaming service
If you want to run the SerialServer as a permanent streamer, please start the module with our specific parameters by
python -m pysomq --serial-port=YourSerialPort --serial-baudrate=YourBaudrate --timeout=1 --streaming-socket=tcp://*:5555 --listening-socket=tcp://*:5556
Stream from script
If you want to utilize the SerialServer within your own scripts, start streaming by using the following snippet with our parameters
import pysomq
serial_port = '/dev/ttyS0'
baudrate = 9600
stream_socket = 'tcp://*:5555'
listen_socket = 'tcp://*:5556'
timeout = 1
serial_server = pysomq.SerialServer(port='/dev/ttyS0', baudrate=baudrate,
streaming_socket=stream_socket, listening_socket=listen_socket,
timeout=timeout)
serial_server.start()
Receive streaming data
If you want to utilize the SerialServer within your own scripts, start receiving by using the following snippet with our parameters
import pysomq
stream_socket = 'tcp://localhost:5555'
listen_socket = 'tcp://localhost:5556'
timeout = 1
serial_client = pysomq.SerialClient(streaming_socket=stream_socket, listening_socket=listen_socket,
timeout=timeout)
serial_client.write(b'my first line')
answer = serial_client.readline()
Default values
The default values for calling the module or instantiating the classes are
-
--serial-port / port: /dev/ttyS0 for Linux and COM1 for Windows
-
--serial-baudrate / baudrate: 9600
-
--timeout / timeout: 1 second
-
--streaming-socket / streaming_socket: tcp://*:5555 respectively tcp://localhost:5555
-
--listening-socket / listening_socket: tcp://*:5556 respectively tcp://localhost:5556
Contributing
I welcome any contributions, enhancements, and bug-fixes. Open an issue on GitHub and submit a pull request.
License
pySoMQ is 100% free and open-source, under the MIT license. Use it however you want.
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
Metadata
Release files for pysomq 0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysomq-0.13.tar.gz | 14.1 kB | Without provenance | Details for pysomq-0.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pysomq-0.13-py3-none-any.whl | Python 3 | none | any | Details for pysomq-0.13-py3-none-any.whl |
Total release size: 21.9 kB
Release files / pysomq-0.13.tar.gz
| Download URL | pysomq-0.13.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee6409dce861a1e4c8de46d047c6e4425e582b876abdf3fdf34cf0bbf625164f
|
|
BLAKE2b-256 checksum How to use checksums |
64ffd00d38c299d08d8d09c5b3b5550e678e527678c651844d5bd8dc77375b20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Release files / pysomq-0.13-py3-none-any.whl
| Download URL | pysomq-0.13-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4634f493949ee6ae8b7a0c589602bdb6d458c3ea392420dc5aee978ea2b7b7ce
|
|
BLAKE2b-256 checksum How to use checksums |
5fa48ff7dd49d1c3d68dd22316ceab6e0b9ed69a05951b040d0ad692ff0b3cb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Security for pysomq 0.13
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.