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

Uploaded Python 3

File details

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

File metadata

  • Download URL: py_sse-0.0.2.tar.gz
  • Upload date:
  • Size: 2.8 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.2.tar.gz
Algorithm Hash digest
SHA256 99e5444dd5ff0dc3ce3eb8db33e293043d5bb0ad5f634e3cf0b06ce4e235f8a6
MD5 32c0b7b70ac4cedfb6607b97c370b122
BLAKE2b-256 b027e55a7704cc4c35a6186329c2471aaabd6b53a7c675b0d31630621a4d8ea9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_sse-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8e4dd4a70da7ed5521f087aa73e314340b97fca2d7168aa71a0605188a5bb8a5
MD5 ff669c8a16d551ca3d83610aebcba4fc
BLAKE2b-256 e67512f01e5f6376ac0230d344fedeefa21f68b117bb496389a4c2cc17a68c38

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