Skip to main content

Developer-friendly RPC client to publish RPC requests and receive responses.

Project description

python3-cyberfusion-rpc-client

This library provides a developer-friendly interface to do RPC requests (using Pika).

The library can be used on the requesting side of RabbitMQ consumer.

Install

Debian

Run the following commands to build a Debian package:

mk-build-deps -i -t 'apt -o Debug::pkgProblemResolver=yes --no-install-recommends -y'
dpkg-buildpackage -us -uc

PyPI

Run the following command to install the package from PyPI:

pip3 install python3-cyberfusion-rpc-client

Configure

No configuration is supported.

Usage

Example

from cyberfusion.RPCClient import RPCClient, ContentType
from cyberfusion.RPCClient.containers import RabbitMQCredentials

credentials = RabbitMQCredentials(
    ssl_enabled=True,
    port=5672,
    host='localhost',
    username='guest',
    password='guest',
    virtual_host_name='/',
)

queue_name = 'example.com'
exchange_name = 'dx_order_fruit'

client = RPCClient(credentials, queue_name=queue_name, exchange_name=exchange_name)
response = client.request(body={'amount': 10000, 'type': 'banana'}, content_type=ContentType.JSON)

print(response)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python3_cyberfusion_rpc_client-1.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python3_cyberfusion_rpc_client-1.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file python3_cyberfusion_rpc_client-1.1.tar.gz.

File metadata

File hashes

Hashes for python3_cyberfusion_rpc_client-1.1.tar.gz
Algorithm Hash digest
SHA256 0e84ae5806b51a9b512b9a5234e10110b94c20a9d5fc19897fda377069253eed
MD5 9524b50b03e87d5ba56c2a35614f66e4
BLAKE2b-256 238e0c44c197f8df29e1ebc98ffb4deceac50a4bef74d95437734a8596b53676

See more details on using hashes here.

File details

Details for the file python3_cyberfusion_rpc_client-1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for python3_cyberfusion_rpc_client-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 71727358491ce99ab1f116db997d735e3a1e39c77030562b62329181fa4d3329
MD5 67e2770bf33d237bae455fb81f321bdf
BLAKE2b-256 94f53f286443a1552c6dae996cdd52ea657404f3fb0dab6a9eb3268025a67df6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page