e4e00762bbf3fcbe3c0c0ea955f05c318461569d
- kaya-core: WebSocket ABC gains session attribute and accept(headers=...) - kaya-core: AsgiWebSocket injects headers into websocket.accept message - kaya-rsgi: RsgiWebSocket accepts headers param (ignored — Granian's accept() takes no args) - kaya-session: SessionWebSocket wrapper exposes ws.session and injects Set-Cookie on accept() - kaya-session: SessionMixin registers before/after websocket hooks; session loaded at connect, persisted on close if modified - 10 new WV session tests covering read, persist, handshake cookie, regenerate, invalidate, isolation - Example and README updated
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
Languages
Python
100%