Easy to use IPC library
Project description
Easy to use IPC library
Sometimes there is no need for complicated blazingly fast connections with incredible throughput and even more incredible configuration. You just want made your processes communicate with each other. And that's what this library for.
Idea
There is two main entities: Client
and Server
,
which uses Connectors
to create Connections
.
The only way client and server differs is who initiate a connection. After successful connect there is no difference between them, any side can make requests to other.
Entities
Pairs of Client and Server entities.
Entity | Description |
---|---|
Simple | These entities have only one handler and two operations: request (send message, wait response, return it) and throw (send message and notify responder, that response can be dropped). They use Serializers to serialize request data. |
Route | Similar to simple, but have multiple handlers, identified by exact string match. |
Connectors:
Things which making connections. Connector can be serialized and passed to other processes, e.g. parent process creates connector, run server with it and start childs, which run clients with same connector.
Connector | Description |
---|---|
LocalConnector | Uses Named Pipes on Windows and Unix domain sockets on other systems, if available. This is similar to multiprocessing's connection, but LocalConnector doesn't fallback to TCP. |
TcpConnector | Uses TCP/IP protocol. |
RmqConnector | Uses AMQP message broker, can be scaled. |
Extras
You can install additional dependencies for various features
pip install communica[extraname1, extraname2]
Extra name | Feature |
---|---|
orjson | Faster JSON library, recommended with CPython. |
rabbitmq | RmqConnector, which use AMQP server for communication. |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file communica-0.3.1.tar.gz
.
File metadata
- Download URL: communica-0.3.1.tar.gz
- Upload date:
- Size: 32.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.27.1 setuptools/56.0.0 requests-toolbelt/0.9.1 tqdm/4.65.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97ce97db823017d182bee53a3f0f8334cf3f7b76f1eb826fd5b63c4eec50395e |
|
MD5 | d7ee9d1169679dd901057479cfd3b535 |
|
BLAKE2b-256 | 7fe25817cf156e8e72eaf39e0978a2264e83350d28af6717efdfd608765612a8 |
File details
Details for the file communica-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: communica-0.3.1-py3-none-any.whl
- Upload date:
- Size: 39.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.27.1 setuptools/56.0.0 requests-toolbelt/0.9.1 tqdm/4.65.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67e1af504cf44a61e3e11f5d98ed3b78f85a66713f4adfca40993eb8def145cc |
|
MD5 | 9818490a0b73bfa2747f77dfc3a19859 |
|
BLAKE2b-256 | a541028103b5efc29f16e5633f79c1408116fa113b4d57a6587e28843344bc43 |