Simple IPC server/client
Project description
ipcs
A library for Python for IPC.
(Although it is written as IPC, it can also be used for communication with an external server.)
Installation
$ pip install ipcs
Examples
Run ipcs-server
and run following code.
Client A
# Client A
from ipcs import Client, Request
client = Client("a")
@client.route()
async def hello(request: Request, word: str):
print("Hello, %s!" % word)
client.run("ws://localhost/", port=8080)
Client B
# Client B
from ipcs import Client
client = Client("b")
@client.listen()
async def on_ready():
# Run client a's hello str to say greetings to world.
await client.request("a", "hello", "World")
# or `await client.connections.a.request("hello", "World")`
client.run("ws://localhost/", port=8080)
License
The license is MIT and details can be found here.
Documentation
Documentation is avaliable here.
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
ipcs-0.2.0.tar.gz
(14.3 kB
view details)
Built Distribution
ipcs-0.2.0-py3-none-any.whl
(15.5 kB
view details)
File details
Details for the file ipcs-0.2.0.tar.gz
.
File metadata
- Download URL: ipcs-0.2.0.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c21d6f53ef6105ee44b77af6d884546e75baa13bc30751d7a1cab2b58f60ee10 |
|
MD5 | 234befe9d622f0725d429c150ca99982 |
|
BLAKE2b-256 | 88728f5ce888c5298224bfb34096b2c8667b420fe8ebd8fe54645aeec880a48a |
File details
Details for the file ipcs-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: ipcs-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9582a2d14be8da48a5541e7bb6999308196f3ec0afe47d30bc1bdb3f47d634e7 |
|
MD5 | 59752e99d16b22df2bc4007dd563a08e |
|
BLAKE2b-256 | fb99348b3d69b6e2c9cd6cd0456807fca98301a056f86dee2d3868aa83ad7479 |