Skip to content

Reference

Here's the reference, or code API: every public class and function, by tool, with its parameters and what it raises. The Tutorial - User Guide tells how to use them, and the examples show them in complete apps.

  • Response cache


    Cache, FastAPICache, the @cache decorator, key builders and coders. In fastapi_alcazaba.response_cache.

  • Backends


    Where entries and state live: in memory, Redis, Valkey, GLIDE, memcached, DynamoDB, two levels. In fastapi_alcazaba.backends.

  • Pagination


    The seven strategies, with their parameters and pages. In fastapi_alcazaba.pagination.

  • Rate and concurrency limits


    Requests per window and requests at a time, per client or shared, across processes. In fastapi_alcazaba.rate_limit.

  • Idempotency keys


    The middleware that replays the first response to a retried request. In fastapi_alcazaba.idempotency.

  • Authentication strategies


    FastAPIAuth, Strategy, and the JWT, bearer, OAuth2, SAML and session strategies. In fastapi_alcazaba.auth.

  • API keys, tokens and codes


    Passwords, API keys stored as digests, revoked tokens, one-time codes, the second factor (TOTP) and passkeys (WebAuthn). In fastapi_alcazaba.auth.

  • Authorization


    A Casbin, Cedar or Open Policy Agent policy per route or for every request: FastAPIAuthz, AuthzMiddleware, CedarEnforcer and OPAEnforcer. In fastapi_alcazaba.authz.

  • Sessions, CSRF and security headers


    What a cookie-based app needs: server-side sessions, CSRF protection, headers and body limits. In fastapi_alcazaba.security.

  • Accounting


    FastAPIAccounting, its quotas, usage reports and records, and their sinks. In fastapi_alcazaba.accounting.

  • Audit trail


    FastAPIAudit, its entries and events, sinks, and the trail's verification. In fastapi_alcazaba.audit.

  • Checking uploads


    The type of a file from its bytes, its size and pixels, safe file names, and signed URLs for object storage. In fastapi_alcazaba.uploads.

  • E-mail


    FastAPIMail, which builds messages nothing can add headers to, and SMTPSender. In fastapi_alcazaba.mail.

  • Webhooks and outbound calls


    Standard Webhooks in and out, and httpx transports with deadlines, breakers and SSRF checks. In fastapi_alcazaba.webhooks and fastapi_alcazaba.outbound.

  • Errors and observability


    Problem details, request IDs, request deadlines, health checks and logs as JSON. In fastapi_alcazaba.observability.

  • Background work


    Scheduled jobs, the task queue, leader election and locks shared by every process, broadcast and the outbox. In fastapi_alcazaba.background.

  • Operations


    Circuit breakers, maintenance mode and feature flags, switched at runtime. In fastapi_alcazaba.operations.

  • Integrity, resilience and errors


    What signs and encrypts entries, RFC 8785 canonical JSON, the backends' circuit breaker, and the exceptions. In fastapi_alcazaba.core.