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.6.tar.gz (4.0 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.6-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py_sse-0.0.6.tar.gz
  • Upload date:
  • Size: 4.0 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.6.tar.gz
Algorithm Hash digest
SHA256 f56c3b60b5a3f8503b767e2d3c2861bc23ed6b3681eac5bda014dedcf01f5dd2
MD5 f22fe045de1af9a73fb91eb27031eb3a
BLAKE2b-256 ea1b2007c034af9f03741c90b2e1f11892b15f80c0b37bf79014e67320219067

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_sse-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.2 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8823a09e54fd3ae650b9e9242caac2f79565aa042c8f7ab6d72c39fd2f1686c4
MD5 9f7605af2d0091f868472f4f31d59742
BLAKE2b-256 80241a2e8cde7248a75afe26d155dabb636573dd6d768efda32baf8560b1910d

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