About 50 results
Open links in new tab
  1. 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 …

  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. Python FastAPI base path control - Stack Overflow

    Dec 3, 2021 · When I use FastAPI , how can I sepcify a base path for the web-service? To put it another way - are there arguments to the FastAPI object that can set the end-point and any others I define, to …

  4. 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 …

  5. Why does my FastAPI application redirect to HTTP and not HTTPS?

    Jan 13, 2025 · When running locally via HTTPS, FastAPI (Starlette / Uvicorn) redirect routes successfully from HTTPS to HTTPS, and from HTTP to HTTP. When I run the application on Azure …

  6. How to upload a file from React frontend to FastAPI?

    Jun 20, 2022 · Here are two options for uploading a file to a FastAPI application, using JavaScript in the frontend. Option 1 demonstrates a Fetch API approach, while Option 2 uses the Axios HTTP client. If …

  7. How to return data in JSON format using FastAPI? - Stack Overflow

    Oct 6, 2022 · FastAPI (actually Starlette) will automatically include a Content-Length header. It will also include a Content-Type header, based on the media_type and appending a charset for text types. …

  8. 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 …

  9. ModuleNotFoundError: No module named 'fastapi' - Stack Overflow

    Feb 14, 2022 · Here is my file structure and requirements.txt: Getting ModuleNotFoundError, any help will be appreciated. main.py from fastapi import FastAPI from .import models from .database import …

  10. Where to put depends/ dependendies for authentication in Fastapi?

    Apr 28, 2021 · Where to put depends/ dependendies for authentication in Fastapi? Asked 4 years, 11 months ago Modified 4 years, 11 months ago Viewed 16k times