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 Wirthian implementation plan Wirth would insist on clear module boundaries where each module does exactly one thing. Five modules, each under 50 lines:

Copied! 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.

Want to start with request.py? It's the foundation — everything else reads from it.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: py_sse-0.0.3.tar.gz
  • Upload date:
  • Size: 3.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.3.tar.gz
Algorithm Hash digest
SHA256 2b550f7cb5d449990aef5e422f07bc708d27fe5a81ffb57129b833914ac3c3ec
MD5 0489e8bef7e4ee8e1ef115c52de848f9
BLAKE2b-256 1c855af519d8ec045c848e68e585fe93d2bf101e3c6e096deaa73020ca8b6881

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_sse-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a1048a2e2fb0e4b86743c157907381d13dfbc5da51930a4b0af20103571fad54
MD5 b8c475d113373a8f63565daf78e8b778
BLAKE2b-256 7a9875b3c63004ddc6242994fad08a28e1c43a04eaf0cd4663c639fa0d9d01b9

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