Unix domain socket unicast transport for Swarmauri.
Project description
Swarmauri UDS Unicast Transport
The Swarmauri UDS Unicast Transport offers reliable, ordered, local-only
communication over Unix domain sockets. It embraces the unified transport
lifecycle so the server and client contexts are created directly from the
transport instance (.server(...) / .client(...)).
Installation
Using uv
uv add --directory pkgs/standards/swarmauri_transport_uds_unicast swarmauri_transport_uds_unicast
Using pip
pip install swarmauri_transport_uds_unicast
Usage
The example below demonstrates setting up a server and client that echo messages over a Unix domain socket path.
import asyncio
from swarmauri_transport_uds_unicast import UdsUnicastTransport
SOCKET_PATH = "/tmp/swm-uds.sock"
async def main() -> None:
server = UdsUnicastTransport(SOCKET_PATH)
async def run_server():
async with server.server():
data = await server.recv()
await server.send("peer", b"echo:" + data)
async def run_client():
client = UdsUnicastTransport(SOCKET_PATH)
async with client.client():
await client.send("server", b"ping")
response = await client.recv()
print(response.decode())
await asyncio.gather(run_server(), run_client())
asyncio.run(main())
This transport is ideal for same-host communication where low latency and security isolation are required.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarmauri_transport_uds_unicast-0.1.0.dev41.tar.gz.
File metadata
- Download URL: swarmauri_transport_uds_unicast-0.1.0.dev41.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63698c6ba9b94873e3d0de61208c4dd7f0840d35ca12cd645fe69b5d8625a145
|
|
| MD5 |
003dbe6d2d22ba1e3af37c683b8de6d6
|
|
| BLAKE2b-256 |
8e91e8ea70593beab4fcfefbb02951c71187f60b3874d6b0f09e4d77b5886422
|
File details
Details for the file swarmauri_transport_uds_unicast-0.1.0.dev41-py3-none-any.whl.
File metadata
- Download URL: swarmauri_transport_uds_unicast-0.1.0.dev41-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f78193f061e9d4378a9874f072d4ea137e4d8e2820b1599e89063488a5c54d0
|
|
| MD5 |
4a61b1a265fb237cc91def1df5141cb6
|
|
| BLAKE2b-256 |
790e2e32bd4f72abe79b15ede9633b372544b94e817170017d2afebc4a131d0b
|