FastAPI framework, high performance, easy to learn, fast to code, ready for production (by tiangolo)

Fastapi Alternatives

Similar projects and alternatives to fastapi

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better fastapi alternative or higher similarity.

fastapi reviews and mentions

Posts with mentions or reviews of fastapi. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-06.
  • Building a Multi-Tenant App with FastAPI, SQLModel, and PropelAuth
    2 projects | | 6 Dec 2023
    In this tutorial, we’ll walk you through how to create a multi-tenant link shortening product using FastAPI (a popular Python web framework), SQLModel (a library for interacting with SQL databases in Python) and PropelAuth (a B2B/multi-tenant authentication provider).
  • APIs in Go with Huma 2.0
    6 projects | | 6 Dec 2023
    When it came time to evaluate replacing the now aging service, I prototyped a new version using the rapidly growing FastAPI framework, which automatically generates OpenAPI from the code for you, eliminating the possibility of the code & OpenAPI being out of sync, with the downstream effect of the docs, CLI, and SDKs also staying in sync properly. You can also still use a design-first approach, it just involves some structures written in code to be reviewed first. Design vs. code first is a false dichotomy by which we needn't be constrained.
  • It's Christmas day. You wake up, run to the tree, tear open the largest package with your name on it... FastAPI has added _____?
    4 projects | /r/Python | 6 Dec 2023
    Getting rid of redoc and replacing it with something that actually has api testing and not predatory pricing (4k a year for "search" for their premium version). There's literally two PR's open for alternatives that I've been following but doubt they'll get approved 1. scalar - This is like Redoc on steroids 2. stoplight - Has been open for almost 2 years
  • The Blueprint for Trustworthy AI: Constructing Accurate Chatbots with Sophisticated Data Pipelines
    3 projects | | 9 Nov 2023
    Python (FastAPI web framework)
  • Experience using crow as web server
    11 projects | /r/cpp | 6 Nov 2023
    I'm investigating using C++ to build a REST server, and would love to know of people's experiences with Crow-- or whether they would recommend something else as a "medium-level" abstraction C++ web server. As background, I started off experimenting with Python/FastAPI, which is great, but there is too much friction to translate from pybind11-exported C++ objects to the format that FastAPI expects, and, of course, there are inherent performance limitations using Python, which could impact scaling up if the project were to be successful.
  • Building a Secure API with FastAPI, PostgreSQL, and Hanko Authentication
    5 projects | | 30 Oct 2023
    In today's fast-paced digital landscape, building robust, secure and user-friendly API is necessity. In this blog post, we'll explore the development of a fastapi application using a powerful tech stack consisting of FastAPI, PostgreSQL, and integrating Hanko authentication for enhanced security.
  • FastAPI Production Setup Guide 🏁⚡️🚀
    6 projects | | 18 Oct 2023
    import logging import sys import time from datetime import datetime from typing import Any, Callable, TypeVar import uvicorn from bson import ObjectId from fastapi import FastAPI, HTTPException, Path, Request, Response from fastapi.middleware.cors import CORSMiddleware from motor.motor_asyncio import AsyncIOMotorClient from pydantic import BaseModel from pydantic_settings import BaseSettings, SettingsConfigDict class Settings(BaseSettings): mongo_uri: str root_path: str = "" logging_level: str = "INFO" model_config = SettingsConfigDict(env_file=".env", extra="ignore") settings = Settings() logging.basicConfig( stream=sys.stdout, level=settings.logging_level, format="[%(asctime)s] %(levelname)s [%(name)s.%(funcName)s:%(lineno)d] %(message)s", # noqa: E501 datefmt="%d/%b/%Y %H:%M:%S", ) logger = logging.getLogger("my-todos") db_client = AsyncIOMotorClient(settings.mongo_uri) db = db_client.todoDb description = """ This is a fancy API built with [FastAPI🚀]( 📝 [Source Code]( 🐞 [Issues]( """ app = FastAPI( title="My Todo App", description=description, version="1.0.0", docs_url="/", root_path=settings.root_path, ) app.add_middleware( CORSMiddleware, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], allow_origins=[ "http://localhost:3000", ], ) MONGO_ID_REGEX = r"^[a-f\d]{24}$" F = TypeVar("F", bound=Callable[..., Any]) class Todo(BaseModel): title: str completed: bool = False class TodoId(BaseModel): id: str class TodoRecord(TodoId, Todo): created_date: datetime updated_date: datetime class NotFoundException(BaseModel): detail: str = "Not Found" @app.middleware("http") async def process_time_log_middleware(request: Request, call_next: F) -> Response: """ Add API process time in response headers and log calls """ start_time = time.time() response: Response = await call_next(request) process_time = str(round(time.time() - start_time, 3)) response.headers["X-Process-Time"] = process_time "Method=%s Path=%s StatusCode=%s ProcessTime=%s", request.method, request.url.path, response.status_code, process_time, ) return response"/todos", response_model=TodoId) async def create_todo(payload: Todo) -> TodoId: """ Create a new Todo """ now = datetime.utcnow() insert_result = await db.todos.insert_one( { "title": payload.title, "completed": payload.completed, "created_date": now, "updated_date": now, } ) return TodoId(id=str(insert_result.inserted_id)) @app.get( "/todos/{id}", response_model=TodoRecord, responses={ 404: {"description": "Not Found", "model": NotFoundException}, }, ) async def get_todo( id: str = Path(description="Todo ID", pattern=MONGO_ID_REGEX) ) -> TodoRecord: """ Get a Todo """ doc = await db.todos.find_one({"_id": ObjectId(id)}) if not doc: raise HTTPException(status_code=404, detail="Not Found") return TodoRecord( id=str(doc["_id"]), title=doc["title"], completed=doc["completed"], created_date=doc["created_date"], updated_date=doc["updated_date"], ) @app.get("/todos", response_model=list[TodoRecord]) async def get_todos() -> list[TodoRecord]: """ Get Todos """ todos: list[TodoRecord] = [] async for doc in db.todos.find(): todos.append( TodoRecord( id=str(doc["_id"]), title=doc["title"], completed=doc["completed"], created_date=doc["created_date"], updated_date=doc["updated_date"], ) ) return todos @app.put( "/todos/{id}", response_model=TodoId, responses={ 404: {"description": "Not Found", "model": NotFoundException}, }, ) async def update_todo( payload: Todo, id: str = Path(description="Todo ID", pattern=MONGO_ID_REGEX), ) -> TodoId: """ Update a Todo """ now = datetime.utcnow() update_result = await db.todos.update_one( {"_id": ObjectId(id)}, { "$set": { "title": payload.title, "completed": payload.completed, "updated_date": now, } }, ) if update_result.matched_count == 0: raise HTTPException(status_code=404, detail="Not Found") return TodoId(id=id) @app.delete( "/todos/{id}", response_model=bool, responses={ 404: {"description": "Not Found", "model": NotFoundException}, }, ) async def delete_todo( id: str = Path(description="Todo ID", pattern=MONGO_ID_REGEX), ) -> bool: """ Delete a Todo """ delete_result = await db.todos.delete_one({"_id": ObjectId(id)}) if delete_result.deleted_count == 0: raise HTTPException(status_code=404, detail="Not Found") return True if __name__ == "__main__": "main:app", host="", port=8000, log_level="debug", reload=True, )
  • An Introduction to ⚡FastAPI
    5 projects | | 17 Oct 2023
    FastAPI documentation
  • DevOps with Fast API & PostgreSQL: How to containerize Fast API Application with Docker
    4 projects | | 3 Oct 2023
    FastAPI is an open-source modern framework that is used to build APIs in Python.
  • Unexpected Expected Thriller: A Tale of Coding Curiosity
    4 projects | | 10 Sep 2023
    Today, I'm going to take you on a thrilling coding adventure inspired by a LinkedIn code snippet, where I tangled with FastAPI, River, Watchdog, and Tenacity. Ready? Buckle up!
  • A note from our sponsor - #<SponsorshipServiceOld:0x00007f0fa225cac0> | 8 Dec 2023
    SaaSHub helps you find the best software and product alternatives Learn more →


Basic fastapi repo stats
6 days ago

tiangolo/fastapi is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of fastapi is Python.

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives