Skip to content

FastAPI next - #249

Draft
amotl wants to merge 4 commits into
auth-magicfrom
fastapi
Draft

amotl wants to merge 4 commits into
auth-magicfrom
fastapi

Conversation

@amotl

@amotl amotl commented Nov 26, 2026

Copy link
Copy Markdown
Member

Better than GH-248?

PatZilla Developers added 4 commits November 26, 2026 23:47
Introduce `patzilla.web`, mapping the concepts of the former Pyramid
and Cornice implementation onto FastAPI.

- `WebSettings`: Typed settings from the INI file, retaining its format
- `AppState`: Application-wide objects, created within the lifespan,
  replacing the registry and its ZCA utilities
- Dependencies for the current user, runtime settings, opaque link
  parameters, and the upstream clients, replacing request subscribers
- `SessionAuthMiddleware`: Session cookie and `X-User-Id` authentication,
  including sliding session renewal
- Exception handlers rendering `ServiceError`, HTTP, and validation
  errors using the JSON error envelope the frontend expects
- Mako templates with page globals, replacing `pyramid_mako`
- `client_cache_region`: Beaker cache decorator excluding the upstream
  client from the cache key, keeping cache keys stable
- `patzilla serve`, running the application using uvicorn
Remove the access layer's dependency on the current request.

- Upstream clients (EPO OPS, IFI CLAIMS, depa.tech, SIP) are passed as
  first argument, instead of being acquired from the current request
- Client pools are created by factory functions, credentials are
  resolved from explicit user, vendor, and data source settings
- Upstream errors raise `ServiceError` instead of accumulating
  `request.errors`
- HTTP errors use Starlette's `HTTPException`
- `RuntimeSettings`, the email submission, and usage metrics receive
  request, user, and settings explicitly
- Navigator pages, office redirects, and all API services are
  `APIRouter`s with typed parameters, retaining paths, HTTP methods,
  parameter names, and response formats
- Search endpoints accepting GET and POST read query and form parameters
- JSON or XML responses are selected by the `Accept` header
- Identity and magic link endpoints use the session middleware and the
  error envelope; cookie helpers work on Starlette responses
- Remove Pyramid subscribers, renderers, and the Cornice patch
- Command line programs bootstrap the application state without an
  HTTP server, and pass upstream clients explicitly
- Tests use FastAPI's `TestClient`, including a comparison of the
  route table with the former Pyramid application, and the magic link
  sign-in flow over HTTP
- Replace `pserve` and waitress with `patzilla serve` (uvicorn)
- Remove Pyramid, Cornice, Akhet, waitress, and Paste dependencies
- Update configuration templates, Docker Compose, Makefile, and docs
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 1

  • coderabbit-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 77ac0142-6468-4150-92ad-081c46254b96

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@amotl
amotl changed the base branch from main to auth-magic November 26, 2026 22:49
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 patzilla | 🛠️ Build #36199061 | 📁 Comparing a7e3a8c against latest (4732de7)

  🔍 Preview build  

3 files changed
± development/CHANGES.html
± install/docker.html
± running/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant