woggioni 1e1e031a56
CI / Build Pip package (push) Successful in 1m57s
Fix key-loop in Tree.add to reuse existing children for literal segments after a matcher boundary
The key-loop unconditionally called self.parse() and overwrote
result.children[key] for literal segments after the walk-down loop
broke at a parameter. This destroyed pre-existing subtrees (with their
method children and handlers) when a second route (e.g. POST) shared
the same literal sub-segments after a parameter.

Added a children.get(key) reuse check before parse(), mirroring the
walk-down loop's child-reuse logic but extended past the boundary
where parameters live in path_matchers, not children.
2026-07-24 12:54:07 +00:00
2026-07-23 23:35:15 +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-session-redis — Redis-backed session storage (packages/kaya-session-redis/)
  • kaya-session-memcache — memcached-backed session storage (packages/kaya-session-memcache/)
  • 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-session-redis -e packages/kaya-session-memcache -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-session-redis/tests
python -m unittest discover -s packages/kaya-session-memcache/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.session.redis
mypy -p kaya.session.memcache
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-session-redis
python -m build packages/kaya-session-memcache
python -m build packages/kaya-oidc
S
Description
A lightweight ASGI/RSGI web framework
Readme MIT
194 KiB
Languages
Python 100%