Best of FastAPI — 2025

  1. 1
    Article
    Avatar of medium_jsMedium·47w

    How to Build Production Ready AI Agents in 5 Steps

    A comprehensive 5-step guide for building production-ready AI agents, covering Python foundations with FastAPI and async programming, implementing robust testing and logging, mastering RAG for knowledge retrieval, designing scalable agent architectures with frameworks like LangGraph, and establishing continuous monitoring and improvement processes. The guide emphasizes moving beyond prototype demos to create reliable, maintainable systems that can handle real-world production environments.

  2. 2
    Article
    Avatar of mlmMachine Learning Mastery·45w

    Your First Local LLM API Project in Python Step-By-Step

    A comprehensive guide for setting up a local large language model API using Python, Ollama, and FastAPI. The tutorial covers downloading and running LLMs locally, creating a REST API endpoint, and testing the setup through a web interface. This approach enables developers to interact with language models without relying on external cloud services, providing complete control over the inference process.

  3. 3
    Article
    Avatar of testdrivenTestDriven.io·42w

    Developing a Real-time Dashboard with FastAPI, Postgres, and WebSockets

    A comprehensive tutorial demonstrating how to build a real-time inventory tracking dashboard using FastAPI, PostgreSQL, and WebSockets. The guide covers setting up database triggers with LISTEN/NOTIFY for automatic change detection, implementing WebSocket connections for live data streaming, creating RESTful API endpoints for inventory management, and building a responsive frontend that updates instantly when data changes occur.

  4. 4
    Article
    Avatar of neo4jneo4j·1y

    LLM Knowledge Graph Builder Back-End Architecture and API Overview

    Explores the back-end architecture and API design of the Neo4j LLM Knowledge Graph Builder. Utilizes Python and FastAPI to create a scalable system that processes various document sources, integrates LangChain for generative AI, and employs vector embeddings for semantic analysis. The resulting knowledge graphs, stored in Neo4j, enhance information retrieval and content summarization. This modular approach supports AI-driven conversational interfaces and advanced data interactions.

  5. 5
    Article
    Avatar of lobstersLobsters·1y

    Django vs. FastAPI, An Honest Comparison

    The post compares Django and FastAPI, highlighting their strengths and weaknesses based on real-world experience. Django offers an 'all-batteries-included' approach with everything you need in one package, while FastAPI focuses more on flexibility and performance, requiring additional setup for many features. Django enforces a structured MVT architecture and has a more democratized governance model, whereas FastAPI offers more control and modern features like async support and type safety but relies heavily on external tools. Choosing between them depends on your specific project requirements and the type of skills you want to develop.

  6. 6
    Article
    Avatar of testdrivenTestDriven.io·45w

    Developing a Real-time Dashboard with FastAPI, MongoDB, and WebSockets

    A comprehensive tutorial demonstrating how to build a real-time order dashboard using FastAPI for the backend API, MongoDB with Change Streams for database operations, and WebSockets for live data streaming. The guide covers setting up MongoDB replica sets, implementing CRUD operations for order management, configuring Change Streams to monitor database events, and creating a responsive frontend that displays real-time updates as orders are created, modified, or deleted.

  7. 7
    Article
    Avatar of lpythonLearn Python·48w

    🔥 FastAPI in Production: Build, Scale & Deploy – Series A: Codebase Design

    A comprehensive 3-part series covering production-ready FastAPI development, from project structure and configuration to performance optimization and deployment strategies. The content addresses real-world challenges beyond basic tutorials, focusing on scalable system design for data scientists, backend engineers, and developers transitioning from scripts to production applications.

  8. 8
    Article
    Avatar of infoqInfoQ·1y

    FastAPI-MCP: Simplifying the Integration of FastAPI with AI Agents

    FastAPI-MCP is an open-source library designed to simplify the integration of FastAPI applications with AI agents using the Model Context Protocol (MCP). It enables automatic exposure of API endpoints as MCP-compatible tools, preserving existing documentation and schemas. The library supports flexible deployment options and installation methods, making web services accessible to AI systems with minimal modifications.

  9. 9
    Article
    Avatar of hnHacker News·1y

    evroon/bracket: Selfhosted tournament system

    Bracket is a self-hosted tournament system designed for easy use, leveraging async Python with FastAPI for the backend and Next.js with Mantine for the frontend. It supports various tournament formats such as single elimination, round-robin, and swiss, and allows for dynamic scheduling and management of tournaments and teams. The system can be run using Docker or independently with pipenv and yarn, and is configured using .env files or environment variables.

  10. 10
    Video
    Avatar of youtubeYouTube·1y

    FastAPI Python Tutorial: Build an Analytics API from Scratch

    Learn how to build an analytics API service using FastAPI, Python, and TimescaleDB. The tutorial covers creating a microservice to ingest and store time series data, deploying the application using Docker, and ensuring it runs in a containerized cloud environment with Railway. The step-by-step guide helps in setting up the development environment, writing code for the API, working with Postgres optimized for time series, and finally deploying the setup for production.

  11. 11
    Article
    Avatar of last9Last9·1y

    FastAPI Python for Infra and Ops, Made Simple

    FastAPI is a high-performance, async-ready Python framework ideal for infrastructure and operations automation. It offers significant performance benefits, built-in validation, automatic documentation, and seamless integration with tools like Docker and Kubernetes. FastAPI simplifies building reliable APIs, handling concurrent requests efficiently, and providing endpoints for monitoring and automation tasks.

  12. 12
    Article
    Avatar of communityCommunity Picks·1y

    PydanticAI

    PydanticAI is a Python agent framework designed to facilitate the development of production-grade applications with Generative AI. Built by the Pydantic team, it supports multiple models such as OpenAI, Anthropic, and Cohere. The framework integrates seamlessly with Pydantic Logfire for real-time debugging and performance monitoring. It offers type-safe and structured responses, dependency injection, and streamed outputs to ensure efficient and accurate AI operations. PydanticAI also supports advanced features like graph definitions with typing hints for complex applications.

  13. 13
    Video
    Avatar of youtubeYouTube·43w

    Complete Guide to Build and Deploy an AI Agent with Docker Containers and Python

    A comprehensive guide covering Docker fundamentals and building AI agents with Python. Starts with Docker basics including container creation, image building, and Docker Compose usage. Progresses through setting up FastAPI web applications, integrating databases, and ultimately implementing AI agents using Langchain and Langraph. Covers both local development with Docker containers and deployment strategies using services like Railway and Digital Ocean. Demonstrates how to use both managed LLM services and open-source AI models available through DockerHub.

  14. 14
    Article
    Avatar of dailydoseofdsDaily Dose of Data Science | Avi Chawla | Substack·34w

    Building a Full-stack Agentic App

    AG-UI is an open-source protocol that enables communication between AI agents and frontend interfaces through event-based messaging. The tutorial demonstrates building a stock portfolio agent using CrewAI Flows for the backend and CopilotKit for the frontend, featuring real-time streaming, human-in-the-loop approval, and reactive UI updates. The implementation includes a 5-step workflow covering portfolio initialization, investment parameter extraction, stock data simulation, allocation calculation, and insights generation.

  15. 15
    Article
    Avatar of tdsTowards Data Science·1y

    Designing, Building & Deploying an AI Chat App from Scratch (Part 1)

    Learn how to design, build, and deploy an AI-powered chat application from scratch with a focus on modern, scalable web applications. This guide covers microservices architecture, setting up various backend services with Docker containers, building REST APIs with FastAPI, and creating a simple user interface. Key components include a language model API, PostgreSQL database, private Docker network, and Nginx reverse proxy. The project emphasizes engineering and cloud deployment over using commercial platforms, providing a deeper understanding of real-world systems.

  16. 16
    Article
    Avatar of communityCommunity Picks·1y

    zhanymkanov/fastapi-best-practices: FastAPI Best Practices and Conventions we used at our startup

    Opinionated list of best practices for FastAPI development, including project structure, async routes, Pydantic, and dependency management. It covers a comprehensive folder structure inspired by Netflix's Dispatch, explains the handling of async and sync routes, emphasizes the importance of Pydantic for validations, and provides insights on organizing dependencies for effective request validation. Additional notes on database naming conventions, migration practices, API documentation, and integration tests are also included.

  17. 17
    Article
    Avatar of planetpythonPlanet Python·1y

    From Backend to Frontend: Connecting FastAPI and Streamlit

    The post explains how to create a frontend using Streamlit for a FastAPI backend, providing an efficient, Python-based UI. It discusses the benefits of using Streamlit, offers guidance on making API calls, and covers setting up environment variables and CORS. The author also describes the deployment process using Streamlit Cloud and highlights the advantages of using Docker for development and deployment.

  18. 18
    Article
    Avatar of platformaticPlatformatic·31w

    Integrate Python ASGI with Node.js Apps

    Platformatic releases @platformatic/python, enabling Python ASGI applications to run directly inside Node.js processes. The integration eliminates network overhead by using interprocess communication instead of HTTP calls between services. Built on a Rust bridge layer with the http-handler crate, it provides seamless request/response translation between Node.js and Python. Developers can embed FastAPI, Django, or custom ASGI apps alongside Node.js workloads, particularly useful for AI/ML inference, real-time data processing, and gradual migration scenarios. Benchmarks show competitive performance with traditional ASGI servers while offering microsecond-level latency through in-process architecture.

  19. 19
    Article
    Avatar of testdrivenTestDriven.io·1y

    Building a Real-time Dashboard with FastAPI and Svelte

    Learn to build a real-time analytics dashboard using FastAPI and Svelte, utilizing server-sent events (SSE) for live data updates. This tutorial covers setting up a FastAPI backend, creating a Svelte frontend with SvelteKit, implementing interactive charts with Chart.js, managing real-time data updates, and incorporating alert notifications and configurable settings.

  20. 20
    Article
    Avatar of opensuseopenSUSE·31w

    GSoC 2025, Building a Semantic Search Engine for Any Video

    A GSoC 2025 project that built an end-to-end semantic video search engine capable of finding specific moments within videos using natural language queries. The system uses a two-part architecture: an ingestion pipeline that processes videos with AI models (TransNetV2, WhisperX, BLIP, VideoMAE) to extract shots, transcripts, captions, and actions, then segments them intelligently and enriches them with LLM-generated summaries; and a search application with FastAPI backend that performs hybrid text-visual searches using ChromaDB vector database and Reciprocal Rank Fusion for result ranking, paired with a Streamlit frontend for user interaction.

  21. 21
    Article
    Avatar of platformaticPlatformatic·22w

    Python-Node: Streaming and WebSocket Now Supported

    @platformatic/python-node v2.0.0 introduces HTTP streaming and WebSocket support, enabling real-time bidirectional communication between Python ASGI applications and Node.js. The release implements ASGI 3.0 protocol with new handleStream() method for incremental response processing, request body streaming with backpressure, and full WebSocket support. This enables use cases like server-sent events, live dashboards, chat applications, and ML model inference while maintaining backward compatibility. The streaming architecture provides proper backpressure between languages, reduces memory footprint for large responses, and allows immediate access to headers before body completion.

  22. 22
    Article
    Avatar of tdsTowards Data Science·35w

    How to Build an AI Budget-Planning Optimizer for Your 2026 CAPEX Review: LangGraph, FastAPI, and n8n

    A comprehensive guide to building an AI-powered budget planning system that automates CAPEX portfolio optimization. The solution combines LangGraph for agent orchestration, FastAPI for linear programming optimization, and n8n for workflow automation. Users can send budget requests via email and receive optimized project portfolios that maximize ROI while respecting constraints like sustainability requirements. The system includes email parsing, mathematical optimization using PuLP library, and automated report generation for executive decision-making.

  23. 23
    Video
    Avatar of TechWithTimTech With Tim·41w

    Python Advanced MCP Server Tutorial (Authentication, Databases & More)

    A comprehensive tutorial covering advanced MCP (Model Context Protocol) server development in Python using FastMCP. The guide demonstrates implementing OAuth authentication with Stitch, setting up HTTP transport, creating custom tools and resources, and building a React frontend for user authentication. Key topics include MCP architecture, client-server communication, bearer token authentication, database integration with SQLAlchemy, and production-ready features beyond basic MCP server setup.

  24. 24
    Article
    Avatar of hnHacker News·39w

    Talk to Your AI Agents from Anywhere!

    Omnara is an open-source platform that provides real-time monitoring and control for AI agents like Claude Code and GitHub Copilot. It offers mobile and web dashboards for tracking agent activities, receiving notifications when input is needed, and responding to agent questions remotely. The platform supports both monitoring existing agent sessions and launching agents remotely via a Python SDK, REST API, or CLI commands. Built with FastAPI backend and React/React Native frontends, it uses PostgreSQL for data storage and implements the Model Context Protocol for agent communication.

  25. 25
    Video
    Avatar of TechWithTimTech With Tim·49w

    How To Build a FastAPI & React Full Stack App | Clerk, Databases, LLMs & More

    A comprehensive guide to building a full-stack application using FastAPI for the backend and React for the frontend. The tutorial covers implementing authentication with Clerk, setting up databases with SQLAlchemy, integrating OpenAI's API for generating coding challenges, and creating a complete user interface with routing and state management. The project demonstrates building a coding challenge generator with user quotas, question history, and multiple-choice questions powered by AI.