r/FastAPI • • Nov 26 '22

Question Is FastAPI missing contributors?

Post image
65 Upvotes

r/FastAPI • • Sep 10 '25

feedback request [Release] FastKit: An Admin Panel to Accelerate Your FastAPI Project (Open-source)

64 Upvotes

Hey everyone!

After several months of development, we're excited to share FastKit, a complete admin panel built on FastAPI.

Tired of building user management, authentication, and core admin features from scratch on every project, we decided to create a robust, production-ready solution.

Our goal was to make a boilerplate project inspired by the best practices of the **Laravel** ecosystem, with a clean architecture and a focus on speed.

Here's what it provides out of the box:

  • 🔐 User & Role Management – authentication, user accounts, and role-based permissions

  • 📄 Public Pages – create and manage basic pages for your app

  • 📊 Dashboard – modern Tailwind-powered admin interface

  • 🐳 Dockerized – easy local setup and deployment

  • ⚡ FastAPI – async backend with automatic OpenAPI docs

  • 🗄️ PostgreSQL – reliable and production-ready database

We invite you to take a look at the code on GitHub. We would truly appreciate any feedback or contributions!


r/FastAPI • • Dec 29 '25

Question Fastapi production code repositories on github

63 Upvotes

Hi I'm a beginner learning fastapi.

I want to look at production code, real code which is actually used in real world, not tutorials or examples code. I want to see how they do it. not so advanced, just simple but production-grade.

please suggest such public repositories on github so i can learn and improve myself.

thanks a lot for your time.


r/FastAPI • • Jun 22 '25

pip package FastAPI Guard v3.0 - Now with Security Decorators and more

63 Upvotes

Hey r/FastAPI!

So I've been working on my FastAPI security library (fastapi-guard) for a while now, and it's honestly grown way beyond what I thought it would become. Since my last update on r/Python (I wasn't able to post on r/FastAPI yet), I've basically rebuilt the whole thing and added some pretty cool features.

What's new:

The biggest addition is Security Decorators. You can now secure individual routes instead of just using the global middleware configuration. Want to rate limit just one endpoint? Block certain countries from accessing your admin panel? Done. No more "all or nothing" approach.

from fastapi_guard.decorators import SecurityDecorator

@app.get("/admin")
@SecurityDecorator.access_control.block_countries(["CN", "RU"])
@SecurityDecorator.rate_limiting.limit(requests=5, window=60)
async def admin_panel():
    return {"status": "admin"}

Other stuff that got fixed:

  • Had a security vulnerability in v2.0.0 with header injection through X-Forwarded-For. That's patched now

  • IPv6 support was broken, fixed that too

  • Made IPInfo completely optional - you can now use your own geo IP handler.

  • Rate limiting is now proper sliding window instead of fixed window

  • Other improvements/enhancements/optimizations...

What it does:

Still does all the basic stuff - IP whitelisting/blacklisting, rate limiting, penetration attempt detection, cloud provider blocking, etc. But now it's way more flexible and you can configure everything per route.

Been using it in production for months now and it's solid.

GitHub: https://github.com/rennf93/fastapi-guard Docs: https://rennf93.github.io/fastapi-guard Playground: https://playground.fastapi-guard.com Discord: https://discord.gg/wdEJxcJV

If you're running FastAPI in production, might be worth checking out. It's saved me from a few headaches already. Feedback is MUCH appreciated! - and contributions too ;)

EDIT:

original posts are on r/Python you can check them out here and here


r/FastAPI • • Feb 03 '25

Other From Django to FastAPI: Building a Warehouse Scanner with Raspberry Pi

63 Upvotes

Hey Reddit! I recently developed a warehouse management bin location tool for a company and wanted to share the process. The goal was simple: create a system where warehouse staff could scan a product’s SKU and instantly see its location, product details, and an image. But behind that simplicity was a fun technical journey.

I started with Django because it’s great for rapid prototyping. However, as the project evolved, I realized we needed something more lightweight for handling real-time API calls to Shopify. That’s when I switched to FastAPI. The async capabilities made a huge difference when querying Shopify’s GraphQL API, especially during peak hours. Plus, the automatic OpenAPI docs were a bonus for testing and debugging.

The hardware setup is where things got interesting. The system runs on a Raspberry Pi 4 connected to a 7-inch touchscreen and a USB numeric keypad (no full keyboard needed—just quick SKU entry). The Pi acts as both server and client, hosting a FastAPI backend and serving a minimalist Vue.js frontend. The interface is optimized for speed: workers scan a SKU, and the screen immediately displays the bin location and product image.

One big challenge was handling Shopify’s metafields. Products and variants store their bin locations in custom fields, so the API has to check both levels. Error handling was tricky too—sometimes the GraphQL queries timed out, so I added retries and better logging.

The frontend is stripped down to a single input field that auto-focuses after every scan. No menus, no buttons—just a search bar and results. It’s designed to work under bright warehouse lights, with high-contrast text and large fonts.

Next Step: 3D printing a rugged case to protect the Pi and hardware! Would love design tips if you’ve built something similar

If you have questions about the Shopify integration, the tech stack, or how I optimized the Raspberry Pi setup—ask away in the comments! And if you’ve designed cases for similar hardware, share your tips! I want this prototype to be as rugged as possible for warehouse conditions.

Thanks for reading, and for any feedback! 


r/FastAPI • • Mar 30 '25

Question How do you handle ReBAC, ABAC, and RBAC in FastAPI without overcomplicating it?

62 Upvotes

Hey r/fastapi, I’ve been exploring access control models and want to hear how you implement them in your r/Python projects, especially with FastAPI:

  • ReBAC (Relationship-Based Access Control) Example: In a social media app, only friends of a user can view their private posts—access depends on user relationships.

  • ABAC (Attribute-Based Access Control) Example: In a document management system, only HR department users with a clearance level of 3+ can access confidential employee files.

  • RBAC (Role-Based Access Control) Example: In an admin dashboard, "Admin" role users can manage users, while "Editor" role users can only tweak content.

How do you set these up in FastAPI? Are you writing custom logic for every endpoint or resource, or do you lean on specific patterns/tools to keep it clean? I’m curious about practical setups—like using dependencies, middleware, or Pydantic models—and how you keep it manageable as the project grows.

Do you stick to one model or mix them based on the use case? I’d love to see your approaches, especially with code snippets if you’ve got them!

Bonus points if you tie it to something like SQLAlchemy, SQLModel, hardcoding every case feels tedious, and generalizing it with ORMs seems tricky. Thoughts?


r/FastAPI • • May 04 '25

Other Just released a FastAPI boilerplate with JWT auth, ABAC permissions, and CLI admin setup

61 Upvotes

Hey r/FastAPI!

I've been working on a production-ready FastAPI boilerplate that handles:

  • 🔐 JWT authentication (with refresh tokens)

  • 🛡️ Attribute-Based Access Control (ABAC)

  • 📦 Dockerized PostgreSQL setup

  • 📧 Password recovery with email support

  • ✨ Admin CLI (built with Typer)

Key Features:
✅ alembic migrations out of the box
✅ Pydantic v2 models with strict validation
✅ Pre-configured sqlalchemy async sessions
✅ Tested with Python 3.10+

Perfect if you need to kickstart a project without rebuilding auth/permissions from scratch.

GitHub: https://github.com/Pedroffda/boilerplate-fastapi

Would love feedback from the community! Especially on:

  1. How you handle permission systems in your projects

  2. Any must-have features missing here


r/FastAPI • • Oct 30 '24

Question Where to learn advanced FastAPI?

60 Upvotes

Hello, I'm a frontend dev who is willing to become a full stack developer, I've seen 2 udemy courses for FastAPI, read most of the documentaion, and used it to build a mid sized project.

I always find that there is some important advanced concept that I dont know in backend in general and in FastAPI specifically.

Is there someplace I should go first to learn backend advanced concepts and techniques preferably in FastAPI you guys would recommend

Thanks a lot in advance


r/FastAPI • • Dec 25 '25

Tutorial Visualizing FastAPI Background Tasks & Task Queues

Post image
59 Upvotes

r/FastAPI • • Aug 06 '26

FastAPI Conf 2026 - first ever official FastAPI conference

58 Upvotes

Hello folks!

We're organizing the first ever official FastAPI Conf, in Amsterdam, October 28th, 2026. ✨

It's gonna be very cool, great speakers, and announcements too.

Early Bird tickets are now available (until August 23th).

Here's the website with info, tickets, and newsletter: https://fastapiconf.com


r/FastAPI • • Jan 25 '26

Question FastAPI production architecture: modular design and dependency injection best practices

58 Upvotes

I am new to FastAPI. I have previously worked with Django and DRF. Django feels very well organized and mature, but in my experience it can be slow in some areas and has noticeable performance bottlenecks for certain workloads.

Because of that, I want to give FastAPI a serious try. I am looking for guidance on production level FastAPI architecture.

Specifically:

  • How to structure a FastAPI project in a modular way

  • Best practices for dependency injection

  • How people organize routers, services, and database layers in real world apps

  • Any common pitfalls when moving from Django/DRF to FastAPI

If you have examples, repo links, or lessons learned from running FastAPI in production, I would really appreciate it.


r/FastAPI • • Sep 06 '25

Tutorial FastAPI Microservices in a Monorepo: a modern setup

58 Upvotes

Here's a a tutorial about having a modern Microservice setup using FastAPI in a Monorepo, an article I wrote a while ago. The Monorepo is organized and managed with a thing called Polylith and you'll find more info about it in the linked tutorial.

You'll find info about the usage of a Monorepo and how well it fits with FastAPI and the Polylith Architecture when developing. Adding new services is a simple thing when working in a Polylith Monorepo, and the tooling is there for a really nice Developer Experience. Just like FastAPI has the nice Programming Experience.

The example in the article is using Poetry, but you can of course use your favorite Package & Dependency management tool such as uv, hatch, pixi and others. Polylith also encourages you to use the REPL, and the REPL Driven Development flow in particular.

Python FastAPI Microservices with Polylith article:

https://davidvujic.blogspot.com/2023/07/python-fastapi-microservices-with-polylith.html


r/FastAPI • • Jan 14 '25

Tutorial Best books to learn FastAPI

58 Upvotes

Hi guys,
I am an experienced Java developer, and recently I got a great opportunity to join a new team in my company. They are planning to build a platform from scratch using FastAPI, and I want to learn it.

I generally prefer learning through books. While I have worked with Python and Flask earlier in my career, that was a few years ago, so I need to brush up.

Could you guys please suggest some great books to get started with FastAPI?


r/FastAPI • • Aug 03 '21

Other FastAPI is the third most loved web framework in a recent stackoverflow survey

Thumbnail
insights.stackoverflow.com
58 Upvotes

r/FastAPI • • Mar 13 '25

pip package Fastapi-create

57 Upvotes

Holla, I’ve just open-sourced fastapi-create, a CLI tool to scaffold FastAPI projects with database setup, Alembic migrations, and more. It’s live on GitHub—ready for you to use, test, and improve! Drop by, give it a spin, and share your feedback: fastapi-create

I really need feedbacks and contributions, thank you 🫡


r/FastAPI • • Mar 31 '24

Other Why I chose FastAPI, how was my experience and what did I like about it

57 Upvotes

As a developer working on an AI-centric application in Python, I was on the lookout for a backend framework. Initially, I started with Django since it's one of the most popular Python web frameworks. However, as a beginner, I found Django quite intimidating and decided to explore other options.

That's when I came across FastAPI. It caught my attention for being one of the most loved frameworks in the Stack Overflow Developer Survey 2022. After trying it out, I was instantly drawn to FastAPI's simplicity and modern features like Asynchronous Server Gateway Interface (ASGI) support and built-in OpenAPI spec (Swagger).

Setting up a basic FastAPI project was a breeze, and I was able to ramp up quickly since FastAPI is built on top of well-established libraries like Starlette and Pydantic. Despite being relatively new, FastAPI proved to be much faster than traditional frameworks like Flask and Django.

One of the key factors that made FastAPI a great fit for my AI app was its excellent support for async code, which is crucial when working with I/O-bound operations like API calls or database queries. Additionally, FastAPI's built-in support for Server-Sent Events (SSE) and OAuth2 made it easier to implement real-time features and secure authentication.

As I continued building my entire app with FastAPI, I found the documentation and community support to be excellent. While there were a few areas where I wished for more resources, the overall experience was smooth, and I was able to find solutions to most of my issues.

A particular use case where FastAPI shone was when I needed to integrate my AI models with the backend. The framework's simplicity and performance made it easier to handle complex data structures and computations without sacrificing speed or introducing unnecessary complexity.

Of course, no framework is perfect, and FastAPI does have some areas for improvement. For instance, its relatively young age means that certain features or integrations might not be as mature as those found in more established frameworks. However, the active development and growing community around FastAPI give me confidence that these issues will be addressed over time.

Overall, I highly recommend FastAPI to Python developers, especially those working on data-intensive or async applications. Its ease of use, performance, and modern features make it a compelling choice, particularly for developers new to backend development or looking to build efficient and scalable APIs.


r/FastAPI • • Mar 22 '26

Tutorial A complete guide to logging in FastAPI

Thumbnail
apitally.io
56 Upvotes

r/FastAPI • • Nov 26 '24

Question FastAPI + React - Full stack

56 Upvotes

I am currently a data engineer who maintains an architecture that ensures the availability and quality of data from on-promise servers to AWS and internal applications in my department. Basically, there is only one person to maintain the quality of this data, and I like what I do.

I use Python/SQL a lot as my main language. However, I want to venture into fullstack development, to generate "value" in the development of applications and personal achievements.

I want to use FastAPI and React. Initially, I started using the template https://github.com/fastapi/full-stack-fastapi-template and realized that it makes a lot of sense, and seems to be very complete.

I would like to know your experiences. Have you used this template? Does it make sense to start with this template or is it better to start from scratch?

I also accept tips on other frameworks to be used on the front end, on the backend it will be FastAPI.

If there is any other template or tips, please send them. Have a good week everyone!


r/FastAPI • • Mar 03 '26 Heartwarming

Tutorial I built an interactive FastAPI playground that runs entirely in your browser - just shipped a major update (38 basics + 10 advanced lessons)

54 Upvotes

I've been working on an interactive learning platform for FastAPI where you write and run real Python code directly in your browser. No installs, no Docker, no backend - it uses Pyodide + a custom ASGI server to run FastAPI in WebAssembly.

What's new in this update:

  • 38 basics lessons - now covers the full FastAPI tutorial path: path/query params, request bodies, Pydantic models, dependencies, security (OAuth2 + JWT), SQL databases, middleware, CORS, background tasks, multi-file apps, testing, and more

  • 10 advanced pattern lessons - async endpoints, WebSockets, custom middleware, rate limiting, caching, API versioning, health monitoring

  • Blog API project restructured - 6-lesson project that teaches real app structure using multi-file Python packages (models.py, database.py, security.py, etc.) instead of everything in one file

How each lesson works:

  1. Read the theory

  2. Fill in the starter code (guided by TODOs and hints)

  3. Click Run - endpoints are auto-tested against your code

Everything runs client-side. Your code never leaves your browser.

Try it: https://www.fastapiinteractive.com/

If you find it useful for learning or teaching FastAPI, consider supporting the project with a donation - it helps keep it free and growing.

Would love to hear feedback, bug reports, or suggestions for new lessons.


r/FastAPI • • Sep 17 '25

Other FastAPI project template

54 Upvotes

Hi everyone,

I just open-sourced a FastAPI project template to help kickstart new APIs. It comes with things like SQLAlchemy/SQLModel, PostgreSQL, Redis, caching, Docker, testing, and CI already set up.

Repo: https://github.com/GabrielVGS/fastapi-base

I built it to save time when starting new projects, feedback and suggestions are very welcome!


r/FastAPI • • May 03 '25

Question use FastAPI to build full stack web apps

54 Upvotes

Hello,

I would like to learn to create simple SaaS applications.

I already know Python, but I don't know any front end and backend technology.
I started exploring Django but it felt very overwhelming, so I pivoted to FastAPI.

Now, what would be your choice for the front end technology?
After some research I came up with 3 options:

  1. FastAPI + React

  2. FastAPI + Jinja2

  3. FastAPI + HTMX

Since in any case, I would have to learn the front end technology from scratch, what would you recommend me to start with?
And also, do you ha any tutorials or course to help me?


r/FastAPI • • Mar 21 '25

Question Best enterprise repos for FastAPI

54 Upvotes

I was curious on what enterprise repos you think are the best using FastAPI for learning good project structure-architecture etc. (like Netflix dispatch)


r/FastAPI • • Mar 05 '25

Question Senior Python Engineer Seeking Book & Resource Recommendations to Master Software Design

54 Upvotes

Hey Pythonistas! I’m a senior software engineer working primarily with Python, and I want to sharpen my software design skills. I’m keen to explore Domain-Driven Design (DDD), microservices, design patterns, and other advanced topics, but with a Python twist—think leveraging frameworks like Django, FastAPI, or libraries like Pydantic in real-world designs. What are your go-to books, courses, blogs, or resources for mastering these concepts in the Python ecosystem? I’d love recommendations that mix solid theory with practical examples, especially if they’ve helped you build scalable, clean systems in Python. Thanks for sharing your favorites!


r/FastAPI • • Jan 24 '26

pip package I built "Violit": A High-Performance UI Framework powered by FastAPI & Signals (O(1) reactivity without reruns)

53 Upvotes

Hi everyone,

I’m a huge fan of the FastAPI ecosystem. While I love FastAPI for its performance, I’ve always struggled to find a Python UI framework that matches its "async-first" speed without the developer friction.

Streamlit is great for prototyping, but the "full script rerun" on every interaction is a performance bottleneck. So, I built Violit. It’s an open-source framework that uses FastAPI as the core engine to deliver a Streamlit-like DX but with O(1) signal-based reactivity.

Demo

Why FastAPI?

I chose FastAPI because I wanted Violit to be production-ready and async-native from day one.

  • State over WebSockets: Violit maintains a persistent connection via FastAPI’s WebSocket implementation. When a state (Signal) changes, only the specific component updates—no page refreshes or full script reruns.

  • Async-First: Since it’s built on FastAPI, it handles asynchronous tasks (like AI inference or DB queries) without blocking the UI. (This feature will be updated soon.)

  • High Throughput: By leveraging Uvicorn/Starlette under the hood, it scales far better than traditional "rerun-based" frameworks.

Key Features

  • Zero Rerun Architecture: Pure O(1) state updates.

  • 90% Streamlit Compatibility: If you know Streamlit, you already know Violit.

  • Shoelace Web Components: Modern, accessible UI elements.

  • 30+ Built-in Themes: Switch from "Cyberpunk" to "Dracula" with one line: app.theme('dracula').

  • Native Mode: Package your FastAPI-based web app into a desktop app with --native.

Simple Example

import violit as vl
​
app = vl.App()
count = app.state(0) # Reactive Signal
​
# No full script rerun! 
# FastAPI handles the WebSocket message and updates only the label.
app.button("Increment", on_click=lambda: count.set(count.value + 1))
app.write("Current Count:", count)
​
app.run()

Feedback Wanted!

As a fellow FastAPI user, I’d love to hear your thoughts on the architecture. Is there anything you'd like to see in a "FastAPI-based frontend" framework?

I’m currently in early Alpha (v0.0.2) and looking for contributors and feedback to make Python web development even faster!