r/FastAPI

▲ 7 r/FastAPI+1 crossposts

Rate my app?

So this idea started with chatbots like Gemini, ChatGPT and Claude. When I would use them for school work, and would upload my school documents, I would always get incorrect answers or simply confusion.

So this project started as a simple solution for AI to do my schoolwork and now it is called Parseflow, and today I published it. So how it works is when you send in a document, Parseflow will process it and extract all the information within and organize that data to return structured chunks, which can be used directly or can be searched through with the search features. By using Parseflow, you can improve context and reduce token costs. Currently it accepts PDFs, DOCX files and plain text.

I am still a student, graduating high school this year, so I built this project to try pay for university. I still have a lot to learn so any feedback, advice, questions, etc... are appreciated, you can DM me if you need.

reddit.com
▲ 18 r/FastAPI

ORMs to Pydantic models conversion

I'm developing a side project and trying to follow DDD principles as closely as possible. My current structure is router -> service -> repository. I'm using SQLAlchemy for ORM models, which are created and handled in the repository layer.

Right now, I convert those ORM objects into Pydantic models inside the service layer, and then pass those models to the router, which returns them in the response. I'm wondering whether this is the right approach or if there’s a better pattern for handling the conversion and data flow between layers.

reddit.com
u/omry8880 — 1 day ago
▲ 38 r/FastAPI

Coming from ExpressJS, I love FastAPI but... do we really need two sets of models?

Coming from ExpressJS, I’ve been loving how fast and easy FastAPI is. In my Node ecosystem, I usually use Prisma with PostgreSQL, which means I don't strictly need separate models for data i/o. While I can define validation schemas (like Zod) if needed, it’s not forced on a model-by-model basis. If it's a non-mission-critical project and I know what's in the payload, I can skip validation entirely.

But in FastAPI, it feels like I'm forced to maintain two separate models: a Pydantic model for request/response validation, and a SQLAlchemy model for the database.

Does it always have to be this way? Can it just be a single model, and what is the actual industry standard here?

reddit.com
u/West-Goose3582 — 4 days ago

fastapi resource's

Want to learn fast api project wise visit the fast api offical site but what I want is how to structure fastapi app

api calls

database connection

models

authentication flow

third party interaction

needs appropriate resources

reddit.com
u/Longjumping-Dirt-127 — 5 days ago
▲ 19 r/FastAPI

Admin Dashboard for FastAPI

What’s a good admin dashboard for FastAPI? I have a bunch of project ideas I plan on working on in the next few months and I don’t want to be building out a dashboard for each of them. I’ve done some research and while there are some decent ones out there I wanted to see what the community had to say.

reddit.com
u/eleventhSun009 — 6 days ago
▲ 13 r/FastAPI+1 crossposts

I built a framework on top of FastAPI because I got tired of making the same 12 decisions every project

Every FastAPI project I started felt identical. Pick an async ORM, wire migrations, build an admin panel, standardize serialization, write the glue. Same decisions, different project.

Yes, boilerplates exist. But a boilerplate is something you fork and maintain forever, the assembly decisions just move into your codebase. Every new model, you're back to writing the same wiring.

So I built Aksara. It sits on top of FastAPI, you keep the full ecosystem and performance and handles the repetitive assembly. Define a model once and get:

  • Full REST API
  • Admin dashboard
  • Studio UI at /studio/ui to inspect your backend visually
  • AI Console — ask your live backend questions in plain English
  • MCP tool catalog at /ai/tools/mcp — Claude, Cursor, any MCP client can call your API directly

The piece I'm proudest of is field-level AI metadata. ai_sensitive=True removes a field from AI context and the MCP schema entirely. ai_agent_writable=False lets agents read but not modify. Write it once on the model, propagates everywhere.

Five commands from zero to running:

bash

pip install aksara-framework
aksara startproject myapp && cd myapp
aksara dbsetup
aksara migrate
aksara dev

It's pre-1.0, backed by 6378 tests, and honest about its rough edges.

GitHub: https://github.com/nagarjuna-tella/Aksara Docs: https://nagarjuna-tella.github.io/Aksara/

Happy to answer questions or take criticism, built this nights and weekends and genuinely want to know what's wrong with it.

u/LegendBuster — 6 days ago

Better-Auth integration with FastAPI

Hey there I just published the Better Auth integration with FastAPI.

https://github.com/lukonik/fastapi-betterauth

Basically it validates the token coming from Authorization header and fetches the user via JWKS from the Better Auth

It uses pyjwt under the hood to handle caching and security for you. Hope you like it 🔥

u/Excellent_Shift1064 — 5 days ago
▲ 11 r/FastAPI

built a property analysis microservice in fastapi and dependency injection made the whole thing surprisingly clean

a friend who invests in rental properties kept asking me to look up data on houses he was considering. zestimate, price trend, rent estimate, school ratings. he'd text me an address and i'd go manually check zillow. after the 50th time i figured i'd just build him something.

the backend is fastapi. i'm pulling property data from a rest api called zillapi that returns zillow data as json. 300+ fields per property. the fastapi part is what i want to talk about because dependency injection made this project way cleaner than i expected.

i set up the api client as a dependency. a single function that initializes the http client with the bearer token and base url. every endpoint that needs property data just declares it as a parameter. no global state, no passing clients around manually, no import spaghetti.

my main endpoints:

GET /property/{address} → full property summary
GET /compare?addresses=addr1&addresses=addr2 → side by side comparison
GET /cashflow/{address}?down_payment=25 → rental investment analysis

the cashflow endpoint is the one my friend uses most. it takes the rent estimate and asking price from the api response, calculates the mortgage at current rates, and returns monthly cash flow at whatever down payment percentage you pass in. the whole endpoint is about 30 lines including the response model.

pydantic response models were the other win. the raw api response has 300+ fields but i only need about 20 for the frontend. i defined a PropertySummary model with just the fields i care about and fastapi handles the filtering automatically. the response is clean typed json that my react frontend can trust. no extra serialization code, no manual field picking.

i also added background tasks for the comparison endpoint. when you compare 3-4 properties it makes multiple api calls. instead of doing them sequentially i use asyncio.gather so they all fire at once. comparison of 4 properties takes about 2 seconds instead of 6-8.

for the ai feature i set up a skill so he can also ask claude about properties:

npx clawhub@latest install zillow-full

the whole thing runs on a $5/month vps. my friend has been using it every morning for about a month. he checks 10-15 properties before he starts his actual job.

reddit.com
u/straightedge23 — 8 days ago
▲ 29 r/FastAPI

How are you handling production background tasks in FastAPI without Celery?

Hey everyone 👋

A while ago I built an open source library called FastAPI Taskflow:

fastapi-taskflow GitHub repository

The goal was to make FastAPI BackgroundTasks more production-ready by adding retries, resiliency, control and visibility without workers or brokers.

It adds extra features like:

  • task persistence
  • concurrency limits
  • scheduling
  • task lifecycle management
  • monitoring dashboard

I’m trying to understand how people are actually using it in real projects and where the pain points still are.

If you’ve used it (even briefly), I’d really love to know:

  • what problem you used it for
  • what worked well
  • what felt awkward or missing
  • where it broke down
  • features you expected but weren’t there
  • whether you eventually switched to Celery/TaskIQ/etc and why

Even if you’re not using it, I’m curious what your current approach is for handling background tasks in FastAPI at scale.

If you find the project interesting or useful, a star on GitHub would also really help support it 🙏

u/Educational-Hope960 — 11 days ago

Stop teaching AI your stack. I built an AI-native FastAPI meta-framework (FastKit Core)

Hi everyone,

Like many of you, I’m using Claude Code and Cursor daily. But I got tired of constantly correcting the agent because it didn't "know" my project’s specific patterns, leading to hallucinated APIs and broken boilerplate.

I’m working on FastKit Core — a meta-framework for FastAPI designed to be "Agent-Friendly" from the ground up.

The Philosophy: Instead of the AI guessing how you structure your services, DTOs, or events, FastKit ships with a pre-configured AI_CONTEXT.md.

How it works:

You reference AI_CONTEXT.md in your CLAUDE.md or .cursorrules.

  1. The agent instantly understands the entire architectural layout.
  2. You can prompt: "Create a new CRUD module for 'Book' with async events" and it actually gets the imports and patterns right the first time.

Key Features of FastKit Core:

  • Production-Ready Patterns: Built-in support for asynchronicity, clean architecture, and standardized response formats.
  • Zero Hallucinations: Every snippet in the context file is verified against actual source code.
  • Meta-Framework approach: It doesn't replace FastAPI; it standardizes it so you can focus on business logic while the AI handles the scaffolding.

I’m looking for early adopters to try it out, break things, and give feedback on the DX (Developer Experience).

Check it out here:https://fastkit.org/docs/fastkit-core

Repo:https://github.com/fastkit-org/fastkit-core

Would love to hear your thoughts on "AI-native" project structures. Is this the future of how we'll build frameworks?

reddit.com
u/somebodyElse221 — 10 days ago
▲ 20 r/FastAPI+1 crossposts

UIGen Update: OAuth 2.0 authentication support & Env Vars

Hey everyone, a few weeks ago I shared UIGen - a CLI that turns your OpenAPI spec into a full React App at runtime. I've been iterating based on feedback and adding features that make it useful for real worl apps.

Recently added OAuth support and environment variable resolution based on feedback.

What's New

x-uigen-auth annotation

Add OAuth authentication to your app declaratively. Supports Google, GitHub, Facebook, and Microsoft. The runtime handles the complete OAuth flow - authorization, token exchange, refresh, and session management.

info:
x-uigen-auth:
providers:
- provider: google
clientId: ${GOOGLE_CLIENT_ID}
redirectUri: ${GOOGLE_REDIRECT_URI}
scopes:
- openid
- email
- profile

Environment variable resolution

Reference environment variables in your config using ${VAR_NAME} syntax. UIGen loads .env files from your spec directory and resolves variables at build time. Supports default values with ${VAR_NAME:default}.

x-uigen-auth:
providers:
- provider: google
clientId: ${GOOGLE_CLIENT_ID}
redirectUri: ${GOOGLE_REDIRECT_URI:http://localhost:8000/callback}

Try It

The Meeting Minutes example demonstrates OAuth with Google. Set up your OAuth credentials, add them to .env, and UIGen handles the rest.

# .env file
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_REDIRECT_URI=http://localhost:8000/api/v1/auth/google/callback

# Run the app
npx @uigen-dev/cli serve openapi.yaml --proxy-base http://localhost:8000

The OAuth flow works end-to-end - click "Sign in with Google", authorize, and you're redirected back with a valid session. Token refresh happens automatically on 401 responses.

Implementation Notes

  • OAuth tokens are managed client-side with automatic refresh
  • CSRF protection via state parameter validation
  • Session validation endpoint support for cookie-based auth fallback
  • Environment variables are resolved server-side before the app starts

Repo: https://github.com/darula-hpp/uigen
Docs: https://uigen-docs.vercel.app

Feedback welcome.

u/Prestigious-Bee2093 — 11 days ago

Chrome extension to copy full Swagger UI endpoint details as Markdown

The copy feature available in Swagger UI only copies the endpoint URL. That’s why I built a Chrome extension that captures all the details of an endpoint and copies them in Markdown format.

You can even copy all endpoints under an entire tag with a single click. Since the output is in Markdown, it can be used to generate API documentation or pasted directly into ChatGPT, Claude AI, and other AI platforms for further processing.

Like: https://github.com/AsiF-Py/Swagger-UI-Copy-Full-Details-Endpoint-Extension

reddit.com
u/Asif1152 — 11 days ago