mirror of
https://github.com/kennethreitz/responder.git
synced 2026-06-05 06:46:14 +00:00
e0cce231ea
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
1.9 KiB
1.9 KiB
Responder
A familiar HTTP Service Framework for Python, by Kenneth Reitz.
Commands
- Tests:
uv run pytest(runs full suite with coverage) - Single test:
uv run pytest tests/test_responder.py::test_name -xvs - Lint:
uv run ruff check . - Type check:
uv run mypy - Build docs:
cd docs && uv run make html - Build package:
uv build - Lock deps:
uv lock
Architecture
responder/api.py— MainAPIclass, the entry point for all appsresponder/routes.py—Router,Route,WebSocketRoutedispatchresponder/models.py—RequestandResponsewrappers around Starletteresponder/ext/— Extensions: CLI, GraphQL, OpenAPI, rate limitingresponder/background.py— Background task queueresponder/formats.py— Content negotiation (JSON, YAML, msgpack)responder/__version__.py— Single source of truth for version string
Conventions
- Python 3.10+ only. Use
from __future__ import annotationswhere present. - Use
inspect.iscoroutinefunction(notasyncio.iscoroutinefunction). - Tests use
api.requests(Starlette TestClient) withallowed_hosts=[";"]or["localhost"]. - Werkzeug 3.1.7+ rejects invalid Host headers — use
localhostwhen mounting WSGI apps in tests. - Version is in
responder/__version__.py, bump it there. - Changelog follows Keep a Changelog format in
CHANGELOG.md. - Compare links at the bottom of CHANGELOG.md must be updated when adding a release.
- All deps managed via
uv. Lock file (uv.lock) is not committed.
Release Process
- Bump version in
responder/__version__.py - Add changelog entry in
CHANGELOG.md(update compare links too) uv lockto refresh the lock file- Commit:
Bump version to X.Y.Z and update changelog git tag vX.Y.Z && git push && git push origin vX.Y.Zgh release create vX.Y.Z --title "vX.Y.Z" --notes "..."uv build && uvx twine upload dist/responder-X.Y.Z*