Skip to main content

Minimal Async implementation for sse

Project description

10,000 ft view py-sse is the thinnest possible layer between raw ASGI and a Datastar-powered web app. No framework dependency — just Python, the ASGI protocol, and html-tags for HTML/SSE generation.

It gives you:

Routing — path → async handler Request — parsed headers, cookies, query, body Response — HTML, text, redirect, cookies, SSE stream Relay — in-process pub/sub so commands can notify streams

py-sse/
  request.py   — parse scope/body into a Request object
  response.py  — build HTTP responses (html, text, redirect, cookie)
  stream.py    — SSE streaming + connection lifecycle
  relay.py     — pub/sub event bus
  router.py    — path→handler dispatch + the ASGI callable

The rule: no module imports from a peer. request.py doesn't know about response.py. relay.py doesn't know about stream.py. The router is the only module that wires them together.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_sse-0.0.5.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_sse-0.0.5-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file py_sse-0.0.5.tar.gz.

File metadata

  • Download URL: py_sse-0.0.5.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for py_sse-0.0.5.tar.gz
Algorithm Hash digest
SHA256 0dd183a12b54c028d18f1bb48414f78da197e73551a7442453ac9aca51e2c7ad
MD5 10cbc1c009dccabc45b1ce24e0fdb9a0
BLAKE2b-256 8a70a46a71402cb8cfe7a4d6c63a4acaad8771e6dde227ed2963b286f9a6c23e

See more details on using hashes here.

File details

Details for the file py_sse-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: py_sse-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for py_sse-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8d850b2801f281e00c52c0d74bed867cff5a1d3f45d603059533f1d9939e05b0
MD5 c40eeba1519c760a58f456ff91ad4f35
BLAKE2b-256 2011dbbc3e5c7c8f0fd6d531ac1be6d9a7b6d9614eb57f458faa6ad56f553ea1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page