Our great sponsors
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Hey! FastAPI creator here
Nice surprise to find this shared on HN!
It's also great to see so many products/projects and companies using it successfuly in production!
I see a bunch of questions related to "how FastAPI compares to X", FastAPI was built from the learnings from other awesome tools, and is built on top of great packages. You can read a lot more about it here: https://fastapi.tiangolo.com/alternatives/
If you have questions or problems, you can ask in GitHub issues: https://github.com/tiangolo/fastapi/issues/new/choose
There's also an official Discord chat: https://discord.gg/VQjSZaeJmf
And finally, if you use FastAPI, I would love your input in the first user survey (you could win stickers ): https://tripetto.app/run/RXZ6OLDBXX?s=hn
Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
I'm glad you're liking FastAPI!
You could check the official project generator, it includes a simple Vue.js front end: https://github.com/tiangolo/full-stack-fastapi-postgresql
Although I'm currently using React with TypeScript and hooks, and it's a great development experience. I plan on adding it to the project generator later.
Write Clean Python Code. Always.. Sonar helps you commit clean code every time. With over 225 unique rules to find Python bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.
Ready-to-use and customizable users management for FastAPI
I'd recommend you check out FastAPI-Users if you haven't already: https://github.com/frankie567/fastapi-users
It provides a users framework with OAuth2 integration, support for different ORM backends, and routes for authentication, verification, etc.
Full disclosure: I am a contributor to this project.
FastAPI simple cache
We are using FastAPI in production.
Some useful links:
- Cookiecutter: https://github.com/tiangolo/full-stack-fastapi-postgresql
A dynamic FastAPI router that automatically creates CRUD routes for your models
Thanks, that's a really helpful example.
Where I think this could be taken to the next level of reusability is in modularising the front-end into API-specific components. For example, the login behaviour could depend on FastAPI-Users, with a sibling frontend library containing components that implement the same login flow. Adding user behaviour is then a matter of using the same third-party library on the front and back end.
This approach could be extended to other components such as an admin panel (perhaps using https://github.com/awtkns/fastapi-crudrouter), or a blogging component.
Simple SQL in Python
I've been using FastAPI for some time, and now I'm using it as a full web framework (not just for REST APIs). I like writing SQL without ORMs, so the combination of aiosql + FastAPI + Jinja2 works great. Add HTMX and even interactive websites become easy.
That's in fact the stack I am using to build https://drwn.io/ and I couldn't enjoy it more.
Thanks Sebastián for creating it!
The Etebase server (so you can run your own) (by etesync)
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
A production ready example Flask app that's using Docker and Docker Compose.
I still happily use Flask with mostly Jinja rendered templates. With things like Hotwire and htmx you can build very nice feeling apps without going all-in with an API back-end and JS front-end.
I released https://github.com/nickjj/docker-flask-example as a starter kit for what I use. It wires up things like SQLAlchemy, Celery, Flask, gunicorn, Webpack, etc. with Docker.
AWS Lambda support for ASGI applications
It does when paired with mangum https://github.com/jordaneremieff/mangum
Async database support for Python. 🗄
Thoughts on aiosql vs encode/databases? Same creator as starlette (under the hood of FastAPI)
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
I use openapi-generator with FastAPI to do this. It has a lot of languages and libraries you can choose from to generate your clients side code in.
A beautiful and fully-featured administration interface builder for hypermedia APIs (by api-platform)
I think the idea is that FastAPI does one thing and does it well. You can mix in other parts of what you need, in the same way FastAPI itself leans on great projects.
SQLAlchemy + Alembic are standard because they're robust and well-know, but there are alternatives (particularly with async)
For admin you can FE it with something like react-admin which has pluggable data providers, or api-admin
Thoughts on FastAPI Users
1 project | /r/FastAPI | 31 May 2023
Is it really advisable to try to run fastapi with predominantly sync routes in a real world application?
7 projects | /r/FastAPI | 13 Apr 2023
JWT Auth Library Issue
2 projects | /r/FastAPI | 20 Mar 2023
Ideas for Svelte + Python backed + social auth
1 project | /r/sveltejs | 17 Dec 2022
Serverless Rest API : api gateway + lambda with RDS database
2 projects | /r/aws | 10 Nov 2022