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.2.tar.gz (4.2 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.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for python3_cyberfusion_rpc_client-1.2.tar.gz
Algorithm Hash digest
SHA256 5356d09efabd0ae6e55b2722b2d451fa69cb7685b425f1fbaae7afeea2534a0f
MD5 8513fdaeec94494804c2a062768086bf
BLAKE2b-256 d1e7a0f2e276452b46298a54617965c9d6a594fc764ed20040824ab2c765f24f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python3_cyberfusion_rpc_client-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a29ac3bea5b6b76b79f5ef545df4b97686e10a0b734ae1c80df31be13522b8b2
MD5 cfb641fa1c599c31a903e8b01df4bc3a
BLAKE2b-256 4eb7a96e8572d179fca7a8b5e01ebe4cd2d7f1c1b00e3999c006a0e668ca178a

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