r/FastAPI • u/Ancient-Direction231 • Dec 10 '25
pip package Built a "batteries included" FastAPI starter - auth, jobs, webhooks in one function call
https://www.nfrax.com/I've rewritten the same FastAPI boilerplate probably 10+ times across different projects. Auth setup, background jobs, webhook handling, caching... it's always the same stuff.
Finally extracted it all into a package. Here's what it looks like now:
from svc_infra.api.fastapi.ease import easy_service_app
from svc_infra.api.fastapi.auth.add import add_auth_users
from svc_infra.jobs.easy import easy_jobs
app = easy_service_app(name="MyAPI", release="1.0.0")
add_auth_users(app) # boom, full auth
queue, scheduler = easy_jobs() # background jobs done
That one add_auth_users() call gives you:
- JWT + sessions
- OAuth (Google, GitHub, etc.)
- MFA/TOTP
- API keys
- Password policies, account lockout, the works
The jobs thing uses Redis under the hood, has retries with backoff, dead letter queue, scheduler for cron stuff.
Also has webhooks (HMAC signing, delivery retries), caching decorators, rate limiting, Prometheus metrics... basically everything I kept copy-pasting between projects.
The catch: It's opinionated. Assumes PostgreSQL, Redis, certain patterns. But everything's overridable if you need different defaults.
Documentation and integration: https://www.nfrax.com/ GitHub: https://github.com/nfraxlab/svc-infra
We also built companion packages for AI stuff (agents, RAG) and fintech (Plaid/Teller) if anyone's into that.
MIT licensed. Curious what patterns other FastAPI devs keep rewriting.
Duplicates
FastAPI • u/Ancient-Direction231 • Dec 17 '25
pip package What do you consider “table stakes” for a FastAPI service? (I tried to package mine)
webdev • u/Ancient-Direction231 • Dec 10 '25
What infrastructure do you keep rewriting for every new project?
SideProject • u/Ancient-Direction231 • Dec 10 '25
Got tired of losing momentum setting up auth/jobs/webhooks - open sourced everything we use
selfhosted • u/Ancient-Direction231 • Dec 10 '25
Guide Open sourced Python packages for self-hosted backends - auth, jobs, AI agents with local LLM support
programming • u/Ancient-Direction231 • Dec 12 '25