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 hashes)
Built Distribution
ipcs-0.2.0-py3-none-any.whl
(15.5 kB
view hashes)