Skip to main content

pynect-worker

pynect-worker is Pynect's Python package. It exports Chanx AsyncAPI schemas, adds an iterator-aware server consumer, and runs Python-owned Chanx applications over Pynect's local IPC transport.

Install

uv add pynect-worker

Configure the ASGI application in the owning Python project:

[tool.pynect]
app = "server:app"

Server iterators

Subclass Pynect's consumer, use Chanx's standard ws_handler, and annotate an iterator return type. Pynect forwards each item and emits Chanx's protocol-level complete frame when the iterator exits normally.

from collections.abc import AsyncIterator
from chanx.core.decorators import ws_handler
from pynect_worker import AsyncJsonWebsocketConsumer

class CatalogConsumer(AsyncJsonWebsocketConsumer):
    @ws_handler
    async def watch(self, message: WatchRequest) -> AsyncIterator[WatchResponse]:
        yield WatchResponse(payload=message.payload)

pynect_worker.ws_handler remains available for compatibility but is deprecated.

The Pynect consumer also accepts synchronous handlers and synchronous Iterator[Response] streams. Async handlers continue to use Chanx unchanged. Chanx's annotations currently type handlers as async-only, so place a portable ignore on synchronous decorator applications:

# Chanx types handlers as async; Pynect adapts synchronous callables.
@ws_handler  # type: ignore
def watch_sync(self, message: WatchRequest) -> Iterator[WatchResponse]:
    yield WatchResponse(payload=message.payload)

Pynect closes server iterators deterministically after normal completion, early return, iteration failure, send failure, or handler cancellation. Normal completion emits complete; failures remain Chanx handler errors.

MIT licensed.

Metadata

Release files for pynect-worker 0.8.11

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

Source distribution (sdist)

Source distribution for pynect-worker 0.8.11
File Size Uploaded Provenance Actions
pynect_worker-0.8.11.tar.gz 7.8 kB Without provenance Details for pynect_worker-0.8.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pynect-worker 0.8.11
File Interpreter ABI Platform Actions
pynect_worker-0.8.11-py3-none-any.whl Python 3 none any Details for pynect_worker-0.8.11-py3-none-any.whl

Total release size: 17.9 kB

Release files / pynect_worker-0.8.11.tar.gz

Download URL pynect_worker-0.8.11.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
08d453d67195b3d336dda7c98115a8c9abd912e99e68167d9c197a2ae34ccd0f
BLAKE2b-256 checksum
How to use checksums
37de01a66c78c604c7cab82d66303e8eca25908812c9da8c41343eb8ec35245e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pynect_worker-0.8.11-py3-none-any.whl

Download URL pynect_worker-0.8.11-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87fc5bfefa75ef57450caef6037033f8ef078db78032b0e61b666458738c8737
BLAKE2b-256 checksum
How to use checksums
e1cabaac0fa71a345848a0529b24fa6e04b9ace26086eb87672cbfddfdaf77c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pynect-worker 0.8.11

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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