r/FastAPI • • Sep 04 '25

pip package Made a FastAPI project generator

80 Upvotes

As a backend developer, I was absolutely fed up with the tedious setup for every new project. The database configs, auth, background tasks, migrations, Docker, Makefiles... It's a total grind and it was killing my motivation to start new things.

So, I built something to fix it! I want to share Fastgen (aka fastapi-project-starter), my personal clutch for getting a production-ready FastAPI project up and running in a few seconds flat.

I made it with developers in mind, so you'll find all the good stuff already baked in:

  • PostgreSQL with your choice of async or sync database code.

  • Celery and Redis for all your background tasks.

  • Advanced logging with Loguru—no more messy logs!

  • It's Docker-ready right out of the box with docker-compose.

This thing has been a massive time-saver for me, and I'm hoping it's just as clutch for you.

Check it out and let me know what you think!

https://pypi.org/project/fastapi-project-starter/

https://github.com/deveshshrestha20/FastAPI_Project_Starter

=====================UPDATE================

Automated post-deployment setup with interactive configuration


r/FastAPI • • May 06 '25

Tutorial I built my own asyncio to understand how async I/O works under the hood

Thumbnail
dev.indooroutdoor.io
80 Upvotes

Hey everyone!

Since I started working with FastAPI, I've always been a bit frustrated by my lack of understanding of how blocking I/O actions are actually processed under the hood when using an async endpoint.

I decided to try and solve the problem myself by building an asyncio-like system from scratch using generators to gain a better understanding of what's actually happening.

I had a lot of fun doing it and felt it might benefit others, so I ended up writing a blog post.

Anyway, here it it. Hope it can help someone else!


r/FastAPI • • Sep 28 '21

Tutorial HTTPS for Developers

80 Upvotes

I just upgraded the FastAPI docs about HTTPS for Developers with lots of details and diagrams. 🔒🎨

Check them out here: https://fastapi.tiangolo.com/deployment/https/


r/FastAPI • • Oct 19 '21

Tutorial 19 Hour FastAPI Course + SQL + Deployment + CI/CD + Docker

Thumbnail
youtube.com
79 Upvotes

r/FastAPI • • Aug 04 '25

Tutorial O'Reilly Book Launch - Building Generative AI Services with FastAPI (2025)

78 Upvotes

Hi Everyone

Some of you might remember this thread from last year where I asked what you'd want in a more advanced FastAPI book: https://www.reddit.com/r/FastAPI/comments/12ziyqp/what_would_you_love_to_learn_in_an_intermediate/.

I know most people may not want to read books if you can just follow the docs. With this resource, I wanted to cover evergreen topics that aren't in the docs.

After a year of writing, building, testing, rewriting and polishing, the book is now fully out.

The book is now available here:

This book is written for developers, engineers and data scientists who already have Python and FastAPI basics and want to go beyond toy apps. It's a practical guide for building robust GenAI backends that stream, scale and integrate with real-world services.

Inside, you'll learn how to:

  • Integrate and serve LLMs, image, audio or video models directly into FastAPI apps

  • Build generative services that interact with databases, external APIs, websites and more

  • Build type-safe AI FastAPI services with Pydantic V2

  • Handle AI concurrency (I/O vs compute workloads)

  • Handle long-running or compute-heavy inference using FastAPI’s async capabilities

  • Stream real-time outputs via WebSockets and Server-Sent Events

  • Implement agent-style pipelines for chained or tool-using models

  • Build retrieval-augmented generation (RAG) workflows with open-source models and vector databases like Qdrant

  • Optimize outputs via semantic/context caching or model quantisation (compression)

  • Learn prompt engineering fundamentals and advance prompting techniques

  • Monitoring and logging usage and token costs

  • Secure endpoints with auth, rate limiting, and content filters using your own Guardrails

  • Apply behavioural testing strategies for GenAI systems

  • Package and deploy services with Docker and microservice patterns in the cloud

What’s in the book:

  • 12 chapters across 530+ pages

  • 174 working code examples (all on GitHub)

  • 160+ hand-drawn diagrams to explain architecture, flows, and concepts

  • Covers open-source LLMs and embedding workflows, image gen, audio synthesis, image animation, 3D geometry generation

Table of Contents

Part 1: Developing AI Services

  1. Introduction to Generative AI

  2. Getting Started with FastAPI

  3. AI Integration and Model Serving

  4. Implementing Type‑Safe AI Services

Part 2: Communicating with External Systems

5. Achieving Concurrency in AI Workloads
6. Real‑Time Communication with Generative Models
7. Integrating Databases into AI Services
Bonus: Introduction to Databases for AI

Part 3: Security, Optimization, Testing and Deployment

8. Authentication & Authorization
9. Securing AI Services
10. Optimizing AI Services
11. Testing AI Services
12. Deployment & Containerization of AI Services

I wrote this because I couldn’t find a book that connects modern GenAI tools with solid engineering practices. If you’re building anything serious with LLMs or generative models, I hope it saves you time and avoids the usual headaches.

Having led engineering teams at multi-national consultancies and tech startups across various markets, I wanted to bring my experience to you in a structured book so that you avoid feeling overwhelmed and confused like I did when I was new to building generative AI tools.

Bonus Chapters & Content

I'm currently working on two additional chapters that didn't make it into the book:

1. Introduction to Databases for AI: Determine when a database is necessary and identify the appropriate database type for your project. Understand the underlying mechanism of relational databases and the use cases of non-relational databases in AI workloads.

2. Scaling AI Services: Learn to scale AI service using managed app service platforms in the cloud such as Azure App Service, Google Cloud Run, AWS Elastic Container Service and self-hosted Kubernetes orchestration clusters.

I'll upload these on the accompanying book website soon: https://buildinggenai.com/

All Feedback and Reviews Welcome!

Feedback and reviews are welcome. If you find issues in the examples, want more deployment patterns (e.g. Azure, Google Cloud Run), or want to suggest features, feel free to open an issue or message me. Always happy to improve it.

Thanks to everyone in the FastAPI and ML communities who helped shape this. Would love to see what you build with it.

Ali Parandeh

https://buildinggenai.com


r/FastAPI • • Sep 13 '24

Tutorial Upcoming O'Reilly Book - Building Generative AI Services with FastAPI

77 Upvotes

UPDATE:

Amazon Links are now LIVE!

US: https://www.amazon.com/Building-Generative-Services-FastAPI-Applications/dp/1098160304

UK: https://www.amazon.co.uk/Building-Generative-Services-Fastapi-Applications/dp/1098160304

Hey everyone!

A while ago I posted a thread to ask the community about intermediate/advanced topics you'd be interested reading about in a FastAPI book. See the related thread here:

https://www.reddit.com/r/FastAPI/comments/12ziyqp/what_would_you_love_to_learn_in_an_intermediate/

I know most people may not want to read books if you can just follow the docs. With this resource, I wanted to cover evergreen topics that aren't in the docs.

I'm nearly finishing with drafting the manuscript which also includes lots of topics related to working with GenAI models such as LLMs, Stable Diffusion, image, audio, video and 3D model generators.

This assumes you have some background knowledge in Python and have at least skimmed through the FastAPI docs but focuses more on best software engineering practices when building services with AI models in mind.
📚 The book will teach you everything you need to know to productise GenAI by building performant backend services that interact with LLMs, image, audio and video generators including RAG and agentic workflows. You'll learn all about model serving, concurrent AI workflows, output streaming, GenAI testing, implementing authentication and security, building safe guards, applying semantic caching and finally deployment!

Topics:

  • Learn how to load AI models into a FastAPI lifecycle memory

  • Implement retrieval augmented generation (RAG) with a vector database and streamlit

  • Stream model outputs via streaming events and WebSockets into browsers

  • How to handle concurrency in AI workloads, working with I/O and compute intensive workloads

  • Protect services with your own authentication and authorization mechanisms

  • Explore efficient testing methods for AI models and LLMs

  • How to leverage semantic caching to optimize GenAI services

  • Implementing safe guarding layers to filter content and reduce hallucinations

  • Use authentication and authorization patterns hooked with generative model

  • Use deployment patterns with Docker for robust microservices in the cloud

Link to book:
https://www.oreilly.com/library/view/building-generative-ai/9781098160296/

Early release chapters (1-6) is up so please let me know if you have any feedback, last minute changes and if you find any errata.

I'll update the post with Amazon/bookstore links once we near the publication date around May 2025.


r/FastAPI • • Nov 29 '25

Other I built a Django-style boilerplate for FastAPI

76 Upvotes

Hi everyone,

I’ve been working with Django for a long time, and I love it's philosophy, the structure, the CLI, and how easy it is to spin up new apps.

When I started using FastAPI, I loved the performance and simplicity, but I often find myself spending a lot of time just setting up the architecture.

I decided to build a boilerplate for FastAPI + SQLAlchemy to bridge that gap. I call it Djast.

What is Djast Djast is essentially FastAPI + SQLAlchemy, but organized like a Django project. It is not a wrapper that hides FastAPI’s internal logic. It’s a project template designed to help you hit the ground running without reinventing the architecture every time.

Key Features:

  • Django-style CLI: It includes a manage.py that handles commands like startapp (to create modular apps), makemigrations, migrate, and shell.

  • Smart Migrations: It wraps Alembic to mimic the Django workflow (makemigrations / migrate). It even detects table/column renames interactively so you don't lose data, and warns you about dangerous operations.

  • Familiar ORM Wrapper: It uses standard async SQLAlchemy, but includes a helper to provide a Django-like syntax for common queries (e.g., await Item.objects(session).get(id=1)).

  • Pydantic Integration: A helper method to generate Pydantic schemas directly from your DB models (similar to ModelForm concepts) helps to keep your code DRY.

  • Interactive Shell: A pre-configured IPython shell that auto-imports your models and handles the async session for you.

Who is this for? This is for Django developers who want to try FastAPI but feel "homesick" for the Django structure and awesome quality-of-life features, or for FastAPI developers who want a more opinionated, battle-tested project layout.

I decided to share it in hope that this is as usefull to you as it is to me. I would also appreciate some feedback. If you have time to check it out, I’d love to hear what you think about the structure or if there are features you think are missing.

Repo: https://github.com/AGTGreg/Djast Quickstart: https://github.com/AGTGreg/Djast/blob/master/quickstart.md

Thanks!


r/FastAPI • • Apr 30 '25

Question FastAPI for enterprise-grade backend

75 Upvotes

Hi all,

I am new to the FastAPI framework, but I have experience working with micro-serivces in Flask(python) and Spring/SpringBoot (Java)

In my work, I had the opportunity to start a new backend project and I felt that FastAPI might be a good choice to adopt and learn ( learning new stuff will make work fun again 😁 )

Therefore, I am wondering if there are FastAPI-opinionated best practices to follow ?

In terms of things like:

  • Security

  • Observability

  • Building

  • Deployment

  • Testing

  • Project Structure

If you can point me to any resource that you liked and you're following, this would be much appreciated.


r/FastAPI • • Mar 22 '25

Question Is fastApi really fast?

73 Upvotes

I’ve seen a few benchmarks showing that FastAPI can be quite fast. Unfortunately, I haven’t been able to reproduce that locally. I’m specifically interested in FastAPI’s performance with a single worker. After installing FastAPI and writing a simple “hello world” endpoint, I can’t get past 500 requests per second. Is that the maximum performance FastAPI can achieve? Can anyone confirm this?


r/FastAPI • • Mar 18 '23

Announcement FastAPI 0.95.0 supports and recommends Annotated 🚀

73 Upvotes

This is probably the biggest FastAPI feature in several months, I thought it was worth sharing it. 🤓

FastAPI 0.95.0, just released, adds support for dependencies and parameters using Annotated and recommends its usage. ✨

This has several benefits, one of the main ones is that now the parameters of your functions with Annotated would not be affected at all.

If you call those functions in other places in your code, the actual default values will be kept, your editor will help you notice missing required arguments, Python will require you to pass required arguments at runtime, you will be able to use the same functions for different things and with different libraries (e.g. Typer will soon support Annotated too, then you could use the same function for an API and a CLI), etc.

Because Annotated is standard Python, you still get all the benefits from editors and tools, like autocompletion, inline errors, etc.

One of the biggest benefits is that now you can create Annotated dependencies that are then shared by multiple path operation functions, this will allow you to reduce a lot of code duplication in your codebase, while keeping all the support from editors and tools.

For example, you could have code like this:

def get_current_user(token: str):
    # authenticate user
    return User()


@app.get("/items/")
def read_items(user: User = Depends(get_current_user)):
    ...


@app.post("/items/")
def create_item(*, user: User = Depends(get_current_user), item: Item):
    ...


@app.get("/items/{item_id}")
def read_item(*, user: User = Depends(get_current_user), item_id: int):
    ...


@app.delete("/items/{item_id}")
def delete_item(*, user: User = Depends(get_current_user), item_id: int):
    ...

There's a bit of code duplication for the dependency:

user: User = Depends(get_current_user)

...the bigger the codebase, the more noticeable it is.

Now you can create an annotated dependency once, like this:

CurrentUser = Annotated[User, Depends(get_current_user)]

And then you can reuse this Annotated dependency:

CurrentUser = Annotated[User, Depends(get_current_user)]


@app.get("/items/")
def read_items(user: CurrentUser):
    ...


@app.post("/items/")
def create_item(user: CurrentUser, item: Item):
    ...


@app.get("/items/{item_id}")
def read_item(user: CurrentUser, item_id: int):
    ...


@app.delete("/items/{item_id}")
def delete_item(user: CurrentUser, item_id: int):
    ...

...and CurrentUser has all the typing information as User, so your editor will work as expected (autocompletion and everything), and FastAPI will be able to understand the dependency defined in Annotated. 😎

Roughly all the docs have been rewritten to use Annotated as the main way to declare parameters and dependencies. All the examples in the docs now include a version with Annotated and a version without it, for each of the specific Python versions (when there are small differences/improvements in more recent versions). There were around 23K new lines added between docs, examples, and tests. 🚀

The key updated docs are:

Special thanks to @nzig for the core implementation and to @adriangb for the inspiration and idea with Xpresso! 🚀

It took a while to get this done as it involved several days thoroughly reviewing the core PR (impeccable job) and a couple of weeks of full-time, continuous, focused work rewriting the docs, examples, and tests. And now it's finally out! 🎉

This will also probably enable much better third-party integrations that can now export Annotated dependencies. 😎

Go update your FastAPI version and start enjoying using Annotated! 🚀

Check more details in the release notes: https://fastapi.tiangolo.com/release-notes/#0950


r/FastAPI • • Jan 08 '26

Question FastAPI for AI apps in 2026: still the best choice?

72 Upvotes

Real-time AI is exploding chatbots, RAG, LLM streaming. Yet I still see new projects using Flask instead of FastAPI. Native async, WebSockets, auto-docs, and Pydantic make it perfect for modern AI serving.Are you using FastAPI for AI/ML APIs? What’s your stack?


r/FastAPI • • Jul 26 '25

pip package Make Your FastAPI Responses Clean & Consistent – APIException v0.1.16

72 Upvotes

🚀 Tired of messy FastAPI responses? Meet APIException!

Hey everyone! 👋

After working with FastAPI for 4+ years, I found myself constantly writing the same boilerplate code to standardise API responses, handle exceptions, and keep Swagger docs clean.

So… I built APIException 🎉 – a lightweight but powerful library to:

✅ Unify success & error responses

✅ Add custom error codes (no more vague errors!)

✅ Auto-log exceptions (because debugging shouldn’t be painful)

✅ Provide a fallback handler for unexpected server errors (DB down? 3rd party fails? handled!)

✅ Keep Swagger/OpenAPI docs super clean

📚 Documentation? Fully detailed & always up-to-date — you can literally get started in minutes.

📦 PyPI: https://pypi.org/project/apiexception/

💻 GitHub: https://github.com/akutayural/APIException

📚 Docs: https://akutayural.github.io/APIException/

📝 Medium post with examples: https://medium.com/@ahmetkutayural/tired-of-messy-fastapi-responses-standardise-them-with-apiexception-528b92f5bc4f

It’s currently at v0.1.16 and actively maintained.

Contributions, feedback, and feature requests are super welcome! 🙌

If you’re building with FastAPI and like clean & predictable API responses, I’d love for you to check it out and let me know what you think!

Cheers 🥂

#FastAPI #Python #OpenSource #CleanCode #BackendDevelopment


r/FastAPI • • May 22 '25

Other Awesome boilerplate for FastAPI

72 Upvotes

Hey devs! 👋

I recently put together a FastAPI boilerplate that brings structure and scalability to backend projects — and I think you’ll find it handy, especially if you’re tired of messy service imports and unorganized codebases.

  • Unified Service Manager (Acquire): All your models, schemas, utilities, libraries, and services are automatically registered and ready to use — no more manual imports when jumping between services. Super helpful for keeping things DRY.

  • Directory-based routing: A clear and modular structure that keeps routes clean and maintainable.

  • Version toggles for libraries: Easily switch or lock library versions — helpful when managing different environments or legacy support.

  • …and more!

🔗 Check it out here:

https://github.com/definableai/definable.backend

We’re also looking for solid contributors who are passionate about clean architecture and want to help build this into something bigger. If that’s you, feel free to DM me — happy to give you a quick walkthrough and onboard you!

Let me know what you think 🙌


r/FastAPI • • Oct 03 '24

pip package I wrote a library that adds a @depends() decorator for FastAPI endpoints

72 Upvotes

I always missed being able to decorate my endpoints in FastAPI with decorators like @authorized(), @cached(max_age=60), etc. but making decorators work with FastAPI endpoints and their dependencies proved surprisingly difficult.

I have now written fastapi-decorators which adds a @depends() decorator that you can use to decorate your endpoints with - with full FastAPI support :)

The documentation lists a couple of useful decorators you can build with @depends():

  • @authorize()

  • @rate_limit(max=5, period=60)

  • @cache(max_age=5)

  • @log_request()

  • @handle_error()

... but you can of course use it for whatever you want.

Hope someone finds it useful.


r/FastAPI • • Dec 04 '24

Question Is SQLModel overrated?

71 Upvotes

Hi there, I recently started to learn FastAPI after many years of Django.

While learning, I followed official documentation which advised to use SQLModel as the "new and better way" of doing things. The solution of having a single model for both model definition and data validation looked very promising at a first glance.

However, over time, I noticed slightly annoying things:

  • I'm often limited and need to add sqlalchemy specific fields anyway, or need to understand how it works (it's not an abstraction)

  • Pydantic data types are often incompatible, but I don't get an explicit error or mapping. For example, using a JsonValue will raise a weird error. More generally, it's pretty hard to know what can I use or not from Pydantic.

  • Data validation does not work when table=True is set. About this, I found this 46-time-upvotated comment issue which is a good summary of the current problems

  • Tiangolo (author) seems to be pretty inactive on the project, as in the previous issue I linked, there's still no answer one year later. I don't wont to be rude here, but it seems like the author loves starting new shiny projects but doesn't want to bother with painful and complex questions like these.

  • I had more doubts when I read lots of negative comments on this Youtube video promoting SQLModel

At that point, I'm wondering if I should get back to raw SQLAlchemy, especially for serious projects. I'm curious to have your opinion on this.


r/FastAPI • • Jan 01 '25

feedback request How I Finally Learned SQLAlchemy

70 Upvotes

Hi there!

Here’s a blog post I wrote about SQLAlchemy, focusing on the challenges I faced in finding the right resources to learn new concepts from scratch.

I hope it helps others. Cheers!


r/FastAPI • • Feb 02 '25

Tutorial Building Real-time Web Applications with PynneX and FastAPI

69 Upvotes

Hi everyone!

I've created three examples demonstrating how to build real-time web applications with FastAPI, using Python worker threads and event-driven patterns. Rather than fully replacing established solutions like Celery or Redis, this approach aims to offer a lighter alternative for scenarios where distributed task queues may be overkill. No locks, no manual concurrency headaches — just emitters in the worker and listeners on the main thread or other workers.

Why PynneX?

While there are several solutions for handling concurrent tasks in Python, each comes with its own trade-offs:

  • Celery: Powerful for distributed tasks but might be overkill for simpler scenarios

  • Redis: Great as an in-memory data store, though it adds external dependencies

  • RxPY: Comprehensive reactive programming but has a steeper learning curve

  • asyncio.Queue: Basic but needs manual implementation of high-level patterns

  • Qt's Signals & Slots: Excellent pattern but tied to GUI frameworks

PynneX takes the proven emitter-listener(signal-slot) pattern and makes it seamlessly work with asyncio for general Python applications:

  • Lightweight: No external dependencies beyond Python stdlib

  • Focused: Designed specifically for thread-safe communication between threads

  • Simple: Clean and intuitive through declarative event handling

  • Flexible: Not tied to any UI framework or architecture

For simpler scenarios where you just need clean thread communication without distributed task queues, PynneX provides a lightweight alternative.

🍓 1. Berry Checker (Basic)

A minimal example showing the core concepts:

  • Worker thread for background processing

  • WebSocket real-time updates

  • Event-driven task handling

Demo

View Code

📱 2. QR Code Generator (Intermediate)

Building on the basic concepts and adding:

  • Real-time image generation

  • Base64 image encoding/decoding

  • Clean Controller-Worker pattern

Thread safety comes for free: the worker generates QR codes and emits them, the main thread listens and updates the UI. No manual synchronization needed.

Demo

View Code

📈 3. Stock Monitor (Advanced)

A full-featured example showcasing:

  • Multiple worker threads

  • Interactive data grid (ag-Grid)

  • Real-time charts (eCharts)

  • Price alert system

  • Clean architecture

Demo

View Code

Quick Start

Clone repository

git clone https://github.com/nexconnectio/pynnex.git
cd pynnex 

Install dependencies

pip install fastapi python-socketio uvicorn

Run any example

python examples/fastapi_socketio_simple.py
python examples/fastapi_socketio_qr.py
python examples/fastapi_socketio_stock_monitor.py

Then open http://localhost:8000 in your browser.

Key Features

  • Python worker threads for background processing

  • WebSocket for real-time updates

  • Event-driven architecture with emitter-listener pattern

  • Clean separation of concerns

  • No complex dependencies

Technical Details

PynneX provides a lightweight layer for:

  1. emitter-listener pattern for event handling across worker threads

  2. Worker thread management

  3. Thread-safe task queuing

Built with:

  • FastAPI for the web framework

  • SocketIO for WebSocket communication

  • Python's built-in threading and asyncio

Learn More

The examples above demonstrate how to build real-time web applications with clean thread communication patterns, without the complexity of traditional task queue systems.

I'll be back soon with more practical examples!


r/FastAPI • • Jan 02 '25

feedback request I tried to compare FastAPI and Django

69 Upvotes

Hi there, I’ve written a blog post comparing FastAPI and Django. It’s not about starting a fight, just providing points to help you choose the right one for your next project.

Hope you find it helpful!


r/FastAPI • • Sep 10 '24

Question Good Python repository FastAPI

69 Upvotes

Hello eveyone !

Does any of you have a good Github repository to use as an example, like a starter kit with everything good in python preconfigured. Like :

  • FastAPI

  • Sqlachemy Core

  • Pydantic

  • Unit test

  • Intégration Test (Test containers ?)

  • Database Migration

Other stuff ?

EDIT : thanks you very much guys, I'll look into everything you sent me they're a lot of interesting things.

It seems also I'm only disliking ORMs 😅


r/FastAPI • • Feb 13 '26

Tutorial Help, i dont understanding any of the db connections variables, like db_dependency, engine or sessionlocal and base

Thumbnail
gallery
67 Upvotes

i was following a tutorial and he started to connect the db part to the endpoints of the api, and the moment he did this, alot of variables were introduced without being much explained, what does each part of those do, why we need all this for?

also why did we do the try, yield and finally instead of ust return db?

execuse my idnorance i am still new to this


r/FastAPI • • Dec 19 '24

Hosting and deployment Render.com is goated

67 Upvotes

I've spent many years spinning up and deploying different Fastapi projects. I tried fly.io, which was the easiest, but I had issues with downtime. CloudRun/Fargate/Digital-Ocean—Lots of setup complexity/debugging before it's working (but once it's working, it's a breeze and the cheapest by far). Railway just didn't work. Porter, I thought, worked seamlessly because it deployed without any errors, but it doesn't work, and the logs are terrible.

Now, I'm deploying with UV (from Astral), which makes writing Python much more enjoyable. However, I was dreading deploying Docker with UV. As mentioned above, I tried the usual suspects with no help, but Render worked literally the first time. I set up a custom domain and had my API endpoints exposed with the right environment variables in minutes.

I am not affiliated with Render, but I hope they don't have the same downtime issues as they scale up and stick around! The frontend is Nextjs, and I've always wanted a Vercel for Docker deployments, so this might be it.


r/FastAPI • • Sep 13 '23

/r/FastAPI is back open

67 Upvotes

After a solid 3 months of being closed, we talked it over and decided that continuing the protest when virtually no other subreddits are is probably on the more silly side of things, especially given that /r/FastAPI is a very small niche subreddit for mainly knowledge sharing.

At the end of the day, while Reddit's changes hurt the site, keeping the subreddit locked and dead hurts the FastAPI ecosystem more so reopening it makes sense to us.

We're open to hear (and would super appreciate) constructive thoughts about how to continue to move forward without forgetting the negative changes Reddit made, whether thats a "this was the right move", "it was silly to ever close", etc. Also expecting some flame so feel free to do that too if you want lol


As always, don't forget /u/tiangolo operates an official-ish discord server @ here so feel free to join it up for much faster help that Reddit can offer!


r/FastAPI • • Apr 20 '22

pip package Fastapi is just about to get a whole lot faster with this 17x improvement on Pydantic

Thumbnail
twitter.com
66 Upvotes

r/FastAPI • • Nov 10 '25

Other FastAPI Template

65 Upvotes

I’m excited to share my new open-source project: Fastapi-Template

It’s designed to give you a solid starting point for building backend APIs with FastAPI while incorporating best practices so you can focus on business logic instead of infrastructure. You can check the docs folder for a walkthrough of the architecture and code.

Highlights

  • Token authentication using JWT with secure password hashing

  • Async SQLAlchemy v2 integration with PostgreSQL

  • Database migrations using Alembic

  • Organized folder structure with clear separation for routes, schemas, services, and repositories

  • Structured logging with Loguru

  • Ready-to-use .env configuration and environment management

  • Pre-commit hooks and code formatting

  • Example cloud storage integration using Backblaze B2

Note:

Feel free to edit it to match your tone, add any screenshots or code snippets you want, and adjust the bullet points to emphasise what you care about most.

If you think something is missing, needs refactoring, or could be better structured, I’d love to hear your thoughts in a comment below or open a PR on Github.