kennethreitz
a3b49ab9fd
Add auth, WebSocket, middleware, config guides. Examples and changelog.
...
New documentation pages:
- Authentication: API keys, JWT tokens, session auth, custom exceptions
- WebSocket Tutorial: echo server, chat room, HTML client, data formats
- Writing Middleware: hooks vs middleware, Starlette integration, ordering
- Configuration: env vars, .env files, secret keys, debug mode, production setup
Also:
- Complete working example at end of quickstart with cross-references
- Three new example files: rest_api.py, websocket_chat.py, sse_stream.py
- Changelog updated for v3.2.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-22 13:56:35 -04:00
kennethreitz
0cbcaf9c4f
Code quality improvements and test fixes ( #592 )
...
## Summary
Comprehensive post-v3.0.0 modernization: new features, bug fixes,
dependency cleanup, docs, and test coverage.
**New features:**
- **HTTP method filtering** — `@api.route("/data", methods=["GET"])`
- **Lifespan context manager** — modern async startup/shutdown
- **`api.exception_handler()`** — custom error handling per exception
type
- **`api.graphql()`** — one-liner GraphQL setup
- **`resp.file()`** — serve files from disk with auto content-type
- **before_request short-circuit** — set status code to skip route
handler
- **`req.path_params`** / **`req.client`** / **`req.is_json`** — new
request properties
- **`uuid`** and **`path`** route convertors
- **PEP 561 `py.typed`** marker
**Bug fixes:**
- Fix multipart parser losing headers
- Fix `url_for()` with typed params (`{id:int}`)
- Fix `resp.body` encoding crash on bytes content
- Fix Python 3.9 type syntax (`from __future__ import annotations`)
- Fix broken session test and no-op file upload test
- Fix helloworld example 404 on root path
**Dependencies:**
- Flattened — `pip install responder` gets everything
- Core: just starlette + uvicorn (down from 10 deps)
**Docs & README:**
- All new features documented in tour
- Modernized README features list
- Deployment guide: Docker, cloud, uvicorn
- Removed Pipenv, extras, stale references throughout
**Tests & quality:**
- 117 tests (up from 92), 91% coverage, 0 warnings
- CaseInsensitiveDict, GraphQL edge cases, staticfiles tests
- Ruff clean, all `tmpdir` → `tmp_path`
🤖 Generated with [Claude Code](https://claude.com/claude-code )
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-22 07:44:11 -04:00
Andreas Motl
a3a12cff77
Chore: Add another basic example
2025-02-03 00:43:10 +01:00
Andreas Motl
6f9c11645a
CLI: Load from file or module. Add software tests and documentation.
...
Also, refactor to `responder.ext.cli`.
2025-01-18 22:22:36 +01:00
kennethreitz
555e9bff65
Add helloworld.py and update serve method in api.py
2024-03-30 20:11:42 -04:00
kennethreitz
e90bd24ebe
Update test.yaml, add Pipfile, and delete httpbin.py
2024-03-30 20:02:39 -04:00
kennethreitz
d70fdd3301
todo
2019-02-09 06:45:25 -06:00
kennethreitz
bc8eb802f7
remove heroku example
2018-10-14 05:46:36 -04:00
kennethreitz
bb6e19e7cd
requirements.txt
2018-10-13 09:54:53 -04:00
kennethreitz
88e17029c5
fixes
2018-10-13 09:50:13 -04:00