Skip to main content

Nexo Client SDK

High-performance Python client for Nexo.

Quick Start

Run server

docker run -p 7654:7654 emanuelepifani/nexo:latest

This exposes:

  • Port 7654 (TCP): Main server socket for SDK clients.

Install SDK

uv add nexo-client

Or with pip:

pip install nexo-client

Connection

from nexo import NexoClient

client = await NexoClient.connect(host="localhost", port=7654)

1. STORE

await client.store.map.set("user:1", {"name": "Max", "role": "admin"})
user: User | None = await client.store.map.get("user:1")
await client.store.map.delete("user:1")

2. QUEUE

Provision durable resources from deployment or administrative code:

result = await client.queue.create(
    "emails",
    visibility_timeout_ms=30_000,
    max_deliveries=5,
)
print(result.status, result.definition.config)

Application code retrieves the existing resource and fails fast when it is missing:

mail_queue: NexoQueue[Email] = await client.queue.get("emails")
await mail_queue.push({"to": "test@test.com"})

async def handle_email(message: Email, meta: QueueMessageMeta) -> None:
    print(meta["id"], message)

subscription = await mail_queue.subscribe(handle_email)
await subscription.stop()

3. PUB/SUB

Topics are routing addresses and do not require provisioning:

alerts: NexoTopic[Alert] = client.pubsub.topic("system-alerts")

async def on_alert(message: Alert) -> None:
    print(message)

subscription = await alerts.subscribe(on_alert)
await alerts.publish({"level": "high"})
await subscription.stop()

all_alerts = client.pubsub.pattern("system-alerts/#")
await all_alerts.subscribe(lambda message, meta: print(meta["topic"], message))

4. STREAM

result = await client.stream.create("user-events")
print(result.status, result.definition.config)

stream: NexoStream[UserEvent] = await client.stream.get("user-events")
await stream.publish({"type": "login", "userId": "u1"})

async def on_event(message: UserEvent, meta: StreamMessageMeta) -> None:
    print(meta["seq"], message)

await stream.group("analytics").subscribe(on_event)

Callbacks for Queue, Pub/Sub, and Stream can be sync def or async async def — the SDK handles both.


Binary Payloads

All Nexo brokers (Store, Queue, Stream, PubSub) natively support raw binary data (bytes).
Bypassing JSON serialization drastically reduces Latency, increases Throughput, and saves Bandwidth.

Perfect for: Video chunks, Images, Protobuf/MsgPack, Encrypted blobs.

heavy_payload = b"\x00" * (1024 * 1024)
stream: NexoStream[bytes] = await client.stream.get("cctv-archive")
queue: NexoQueue[bytes] = await client.queue.get("pdf-processing")
audio_topic: NexoTopic[bytes] = client.pubsub.topic("live-audio-call")

await stream.publish(heavy_payload)
await audio_topic.publish(heavy_payload)
await client.store.map.set("user:avatar:1", heavy_payload)
await queue.push(heavy_payload)

License

MIT

Author

Built by Emanuel Epifani.

Metadata

Release files for nexo-client 7.0.0

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

Source distribution (sdist)

Source distribution for nexo-client 7.0.0
File Size Uploaded
nexo_client-7.0.0.tar.gz 25.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nexo-client 7.0.0
File Interpreter ABI Platform
nexo_client-7.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 55.2 kB

Release files / nexo_client-7.0.0.tar.gz

Download URL nexo_client-7.0.0.tar.gz
Size 25.2 kB
Tags Source
SHA-256 checksum
How to use checksums
efed87266e85dcf28b39326d9121ee870506a86c6754f524d4768382948a7c7d
BLAKE2b-256 checksum
How to use checksums
d03a615dd11e2b8a3075993130bd1696f3a7988c698c84aafe5cdae896934a6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / nexo_client-7.0.0-py3-none-any.whl

Download URL nexo_client-7.0.0-py3-none-any.whl
Size 30.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eddb7e615c8e1186149b4920385fed2d1c95681769289e90972d9b4701bc5599
BLAKE2b-256 checksum
How to use checksums
d1207055cc153f3d70d59a3909732670d527ffa79c12a2fc30d1b3b39db04931
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

7.0.0 This release

2 release files

6.0.0

2 release files

5.0.3

2 release files

5.0.2

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.1.5

2 release files

4.1.4

2 release files

4.1.3

2 release files

4.1.2

2 release files

4.1.1

2 release files

4.1.0

2 release files

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