woggioni ca023580e4 Fix Daphne ASGI compatibility and document WS handshake cookie limitation
- AsgiContext and AsgiWebSocket now default missing  scope key
  to 'http' / 'ws' respectively (Daphne omits it for websocket scopes)
- Add regression test for websocket scope without scheme
- Update example/session.py WS handler to read the session; cookie must
  be set via HTTP first because common ASGI servers ignore the headers
  field on websocket.accept
- Update README with the same caveat about Granian/Daphne/curl
2026-07-23 22:11:06 +08:00
2026-07-15 09:18:48 +08:00
2026-07-15 22:18:45 +08:00
2026-07-15 09:18:48 +08:00

kaya

A lightweight ASGI web framework with method-aware routing, path matching, and recursive wildcard support.

Packages

This repository is a monorepo for the Kaya framework. The code is split into independent packages under packages/:

  • kaya-core — core routing, HTTP/WS abstractions, and ASGI adapter (packages/kaya-core/)
  • kaya-rsgi — RSGI/Granian integration (packages/kaya-rsgi/)
  • kaya-session — server-side HTTP session management (packages/kaya-session/)
  • kaya-oidc — OpenID Connect authentication (packages/kaya-oidc/)

Additional kaya-* packages can be added as new directories under packages/.

Build & run locally

Install dev dependencies:

pip install --index-url https://gitea.woggioni.net/api/packages/woggioni/pypi/simple --extra-index-url https://pypi.org/simple -r requirements-dev.txt

Install the packages in development mode:

pip install -e packages/kaya-core -e packages/kaya-rsgi -e packages/kaya-session -e packages/kaya-oidc

Run the example:

python example/hello.py

Tests

python -m unittest discover -s packages/kaya-core/tests
python -m unittest discover -s packages/kaya-rsgi/tests
python -m unittest discover -s packages/kaya-session/tests
python -m unittest discover -s packages/kaya-oidc/tests

Static analysis

mypy -p kaya.core
mypy -p kaya.rsgi
mypy -p kaya.session
mypy -p kaya.oidc

Building packages

python -m build packages/kaya-core
python -m build packages/kaya-rsgi
python -m build packages/kaya-session
python -m build packages/kaya-oidc
S
Description
A lightweight ASGI/RSGI web framework
Readme MIT
194 KiB
Languages
Python 100%