semvec/pypi-packages huggingface dataset:
quantnet-mq 1.0.0.post1
The schema and messaging library for the Quant-Net Control Plane
Requires Python: >=3.10

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())
```
vmanage-agent 0.2.1
Pip module for node to join salt-master
Requires Python: <3.12,>=3.10

# Table of Contents

-----------------

* [Overview](#overview)
* [Requirements](#requirements)
* [Installation](#installation)
* [Pre-requisites](#pre-requisites)
* [Usage](#usage)
* [File Location](#file-location)
* [Contributing](#contributing)
* [License](#license)

## Overview

Module ***vmanage-agent*** allows **node** to make request to vmanage and add this device to USDN system.

### Enhanced Security Features

The agent now implements **three separate cryptographic key types** for maximum security:

1. **Controller WireGuard Keys** - Management plane (node ↔ controller)
2. **Tunnel WireGuard Keys** - Data plane (node ↔ node via VPP)  
3. **Blockchain RSA Keys** - Configuration encryption/decryption

**Security Guarantee**: Private keys NEVER leave the device. Only public keys are transmitted to backend.

See [SECURITY_KEY_MANAGEMENT.md](./SECURITY_KEY_MANAGEMENT.md) for complete details.

## Requirements

Make sure python and the package manager [pip](https://pip.pypa.io/en/stable/) are installed. Salt-minion >= 3005.1 is also required.

* [python][python] >=3.10
* [pip][pip] >= 3.10
* [salt-minion][salt-minion] == 3005.1

## Installation


Install package with the command below:

```bash
sudo pip3 install vmanage-agent
```

## Pre-requisites

### Salt-minion is running

Checking if salt-minion is running

```bash
sudo systemctl status salt-minion
```

If the output return error, try to stop salt-minion and run in debug mode (salt-minion -l debug)


## Usage

### Run manually

```bash
sudo /usr/local/bin/vmanage-agent -m [master-address] -mf [master-fingerprint] -e [environment]
```

#### Arguments

- `-m, --master` (required): Salt master address
- `-mf, --master-finger` (required): Salt master fingerprint to verify master
- `-e, --env` (optional): Environment - either `production` or `staging` (default: `production`)

#### Examples

**Production (default):**
```bash
sudo /usr/local/bin/vmanage-agent -m salt.usdatanetworks.com -mf a1:b2:c3:d4:e5:f6
```

**Staging:**
```bash
sudo /usr/local/bin/vmanage-agent -m salt-staging.usdatanetworks.com -mf a1:b2:c3:d4:e5:f6 -e staging
```

#### Environment-Specific API Endpoints

- **Production**: `https://api.usdatanetworks.com`
- **Staging**: `https://staging-api.usdatanetworks.com`

### File Location

* *Log*: /var/log/minion.log
* *Config*: /opt/minion/config.ini

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License

[US Data Networks](https://usdatanetworks/docs/license)

[python]: https://www.python.org/downloads/release/python-380/
[pip]:https://pip.pypa.io/en/stable/installation/
[salt-minion]:https://docs.saltproject.io/salt/install-guide/en/latest/topics/bootstrap.html#install-bootstrap