FastAPI 0.139.0
OK FASTAPI 0.139.0 JUST DROPPED ☕️
We're not even a month past 0.138 and Tiangolo is already back with another one period.
The headline feature? Dependencies in app.frontend(). That's right — you can now use dependency injection for your frontend routes just like your API routes period.
What does this mean for you:
- Automatic cookie-based auth for your frontend? Done.
- Session validation before your SPA loads? Easy.
- User-specific frontend config without messy middleware? Yup.
This is a game-changer for anyone building full-stack FastAPI apps period.
Here's the gist: app.frontend(dependencies=[Depends(get_current_user)]) and boom — your HTML routes now have the same clean DI your API endpoints do.
No more copy-pasting auth logic between API and frontend routes period.
Also in this release: a ton of translation updates (12 languages refreshed). The docs are getting love too.
Is it a breaking change? Nope — 100% additive period.
Go update rn 🔗 pip install --upgrade fastapi
Full changelog on GitHub if you want the details period.