The QUANT-NET Message Queue Module (quantnet_mq)
The QUANT-NET Message Queue module provide RPC and Publish/Subscribe capabilities for the control plane, and the package is a common dependency for the QNCP Controller, Agent, and API packages. The module includes:
- Remote procedure call (RPC) client and server implementations
- Publish/Subscribe (pub/sub) client and server implementations
- Core schemas for the QUANT-NET Control Plane network data model
- Auto-generated Python objects for all defined schema
Installing
pip3 install . # or pip3 install -e .
Building
python3 -m build
Testing
MQ_HOST=<broker_host> pytest -v
Example Usage
- RPC client
import asyncio
from quantnet_mq.rpcclient import RPCClient
async def main():
client = RPCClient("example_client")
client.set_handler("myRequest", None,
"quantnet_mq.schema.models.myns.myRequest")
await client.start()
# send a message and wait up to for a response 5s
msg = {"arg1": "value1", "arg2": 999.99}
req = await client.call("myRequest, msg, timeout=5.0)
print (req)
if __name__ == "__main__":
asyncio.run(main())
- Pub/Sub receiver
import asyncio
from quantnet_mq.rpcclient import MsgServer
async def handle_msg(data):
print (data)
async def main():
client = MsgServer()
mclient.subscribe("mytopic", self.handle_msg)
await mclient.start()
# wait as long as needed here ...
if __name__ == "__main__":
asyncio.run(main())
Metadata
Release files for quantnet-mq 1.1.0
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 |
|---|---|---|---|---|
| quantnet_mq-1.1.0.tar.gz | 25.4 kB | Without provenance | Details for quantnet_mq-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quantnet_mq-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for quantnet_mq-1.1.0-py3-none-any.whl |
Total release size: 72.4 kB
Release files / quantnet_mq-1.1.0.tar.gz
| Download URL | quantnet_mq-1.1.0.tar.gz |
|---|---|
| Size | 25.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffc6d46401e59c327d3f43ca8fdd018565fc12af5f12b80b9644b377933ebd38
|
|
BLAKE2b-256 checksum How to use checksums |
ae27b0338776277da9c8c236761ba8efd4599c331d8ed6eb7889b0f7f8c3185c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / quantnet_mq-1.1.0-py3-none-any.whl
| Download URL | quantnet_mq-1.1.0-py3-none-any.whl |
|---|---|
| Size | 47.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eab75032ee5541a90b44b66ea671807b9f049df868bb1a918fa08be43194d83f
|
|
BLAKE2b-256 checksum How to use checksums |
b12e98a1031d1cb372cc315f4036b5438bf5d63b2a25247baf2e974a79f67faa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for quantnet-mq 1.1.0
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.