Best of FastAPIJuly 2024

  1. 1
    Article
    Avatar of hnHacker News·2y

    Modern web applications in pure Python

    FastHTML enables the creation of modern web applications using pure Python, leveraging solid web foundations and offering seamless scalability. With the ability to utilize any Python or JS library, FastHTML provides flexibility and speed, making it ideal for various applications from dashboards to scalable SPAs. Deployment options are versatile, supporting any service or server compatible with Python, and users familiar with FastAPI will find transitioning to FastHTML intuitive. Additionally, incorporating HTMX can enhance functionality by filling in web browser gaps with a lightweight JavaScript library.

  2. 2
    Article
    Avatar of testdrivenTestDriven.io·2y

    Using HTMX with FastAPI

    Learn how to integrate HTMX with FastAPI by creating a simple todo app. This guide covers setting up the environment, creating endpoints to handle CRUD operations, and deploying the app on Render. The combination of FastAPI and HTMX facilitates efficient server-side rendering, minimizing client-side logic and providing a seamless user experience. Included are techniques for rendering HTML conditionally based on request headers and leveraging Jinja2 templates for dynamic content.

  3. 3
    Article
    Avatar of medium_jsMedium·2y

    How to Build a Streaming Agent with Burr, FastAPI, and React

    Learn how to build a streaming agentic chatbot using Burr, FastAPI, and React. This guide covers why streaming is important, introduces the open-source tools used, and provides a step-by-step example of integrating these technologies to create an interactive chatbot. The chatbot streams responses in real-time, leveraging Burr's state machine capabilities, FastAPI's SSEs, and a React frontend. Key steps include modeling the chatbot as a state machine, setting up streaming actions, building an application, exposing it through FastAPI, and creating the UI to handle streaming data.