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.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for python3_cyberfusion_rpc_client-1.0.tar.gz
Algorithm Hash digest
SHA256 09359e15880acdb198173bf0f18aadf652ea583fba9e7bf5e0010792ff37e1cd
MD5 c7589ea317fe56ce418850d11b2f00e4
BLAKE2b-256 4f9fd242db92fe3db01e914d349c61a900c4505d2ce1e3c707911323983955cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python3_cyberfusion_rpc_client-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af1245af61132c79ec20771cd8ebe6e37e6d00fba1f861c31e1e29a5b61755fb
MD5 55f41a0e7c38c0cb3f7c744cda445d2e
BLAKE2b-256 4f3ba314e9e0bbc444d36861b11062d1ae6d576928ab6943b95f903f5f7bb2a7

See more details on using hashes here.

Supported by

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