Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_transport_tls_unicast Discord

srv_ctx.verify_mode = ssl.CERT_REQUIRED

srv_ctx.load_verify_locations("ca.pem")

cli_ctx = ssl.create_default_context()

cli_ctx.load_cert_chain("cli.pem", "cli.key")

async def main(): server = TlsUnicastTransport(srv_ctx)

async def run_server():
    async with server.server(host="0.0.0.0", port=8443):
        data = await server.recv()
        await server.send("peer", b"tls:" + data)

async def run_client():
    client = TlsUnicastTransport(cli_ctx, sni="localhost")
    async with client.client(host="127.0.0.1", port=8443):
        await client.send("server", b"hello")
        response = await client.recv()
        print(response.decode())

await asyncio.gather(run_server(), run_client())

asyncio.run(main())


Configure the SSL contexts with your own certificates (and CA trust) to enable
TLS or full mTLS verification.



Metadata

Release files for swarmauri_transport_tls_unicast 0.11.0.dev1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swarmauri_transport_tls_unicast 0.11.0.dev1
File Size Uploaded
swarmauri_transport_tls_unicast-0.11.0.dev1.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swarmauri_transport_tls_unicast 0.11.0.dev1
File Interpreter ABI Platform
swarmauri_transport_tls_unicast-0.11.0.dev1-py3-none-any.whl Python 3 none any Details

Total release size: 6.8 kB

Release files / swarmauri_transport_tls_unicast-0.11.0.dev1.tar.gz

Download URL swarmauri_transport_tls_unicast-0.11.0.dev1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b6e03cc7ed84a6329d19f05878a5771141d0978039a30f089f8f2563ee2814f0
BLAKE2b-256 checksum
How to use checksums
c533ee9f01cfec0b9cf15e5bd22b691a9a04178fd003b592984d6f32eb7e8d96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}

Release files / swarmauri_transport_tls_unicast-0.11.0.dev1-py3-none-any.whl

Download URL swarmauri_transport_tls_unicast-0.11.0.dev1-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43caa8e5c7f5e7ec31394b2ffc1d1bded4316c229ee536dc018abf308fa0b4a0
BLAKE2b-256 checksum
How to use checksums
8353c92c5a2caeb58275d268f784d914d219c6118b87d517e5363035cbb1ab2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page