About 50 results
Open links in new tab
  1. FastAPI application: page stuck loading - Stack Overflow

    Jul 16, 2025 · I'm trying to create a basic FastAPI application. Initially, my project directory looked like this: .venv/ main.py where .venv/ is my virtual environment with FastAPI installed, while main.py has ...

  2. How to pass an argument to a 'dependencies' function in FastAPI?

    Mar 20, 2025 · The FastAPI Advanced Dependencies guide has a couple examples, specifically oriented around classes. But in your example, so long as verify_token("red") returns a callable with the right …

  3. swagger - FastAPI Fetch error Failed to load .../openapi.json: 404 ...

    Jun 20, 2024 · It seems the issue arises because FastAPI needs to know the root path for all routes when deployed behind a reverse proxy or API Gateway that adds a prefix to the URL. Here's how I …

  4. FastAPI StreamingResponse not streaming with generator function

    Mar 15, 2023 · from fastapi import FastAPI from fastapi.responses import StreamingResponse import asyncio app = FastAPI() async def fake_data_streamer(): for i in range(10): yield b'some fake …

  5. fastapi - How to read body as any valid json? - Stack Overflow

    Oct 15, 2020 · The accepted answer is valid as well, but FastAPI provides a built-in way to do that - check the Singular values in body section in docs. A parameter with the default Body gets all the …

  6. python - How can I install fastapi properly? - Stack Overflow

    Dec 26, 2021 · 0 When you install with pip install "fastapi[standard]" it comes with some default optional standard dependencies.

  7. python - Ratelimit in Fastapi - Stack Overflow

    Dec 29, 2020 · How to ratelimit API endpoint request in Fastapi application ? I need to ratelimit API call 5 request per second per user and exceeding that limit blocks that particular user for 60 seconds. In …

  8. python - How to create a FastAPI endpoint that can accept either File ...

    Dec 31, 2024 · 8 I would like to create an endpoint in FastAPI that might receive either multipart/form-data or JSON body. Is there a way I can make such an endpoint accept either, or detect which type …

  9. python - Does FastAPI still need Gunicorn? - Stack Overflow

    Jul 8, 2025 · Shortly after, FastAPI’s creator deprecated the tiangolo/uvicorn-gunicorn-fastapi Docker image, stating: Now that Uvicorn supports managing workers with --workers, including restarting …

  10. How to get the raw URL path from request in FastAPI?

    May 12, 2022 · As FastAPI is actually Starlette underneath, with a layer of several tools on top, you can use Starlette's Request object directly when you need to. Thus, you can use Request object to get …