About 50 results
Open links in new tab
  1. Newest 'fastapi' Questions - Stack Overflow

    Jan 30, 2026 · Stack Overflow | The World’s Largest Online Community for Developers

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

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

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

  6. How to add both file and JSON body in a FastAPI POST request?

    Dec 30, 2020 · Whenever a new request arrives, FastAPI will take care of calling your dependency, getting the result and assigning that result to the parameter (e.g., base) in your endpoint. For more …

  7. Python: FastAPI error 422 with POST request when sending JSON data

    Jan 27, 2020 · Also, note that FastAPI/Starlette uses the standard json library for parsing the data behind the scenes. If one is looking for a faster alternative, please have a look at this answer that …

  8. How to log raw HTTP request/response in FastAPI?

    Oct 22, 2021 · We are writing a web service using FastAPI that is going to be hosted in Kubernetes. For auditing purposes, we need to save the raw JSON body of the request/response for specific routes. …

  9. How to configure FastAPI logging so that it works both with Uvicorn ...

    Aug 29, 2023 · INFO: 127.0.0.1:50538 - "POST /api/v1/endpoint HTTP/1.1" 200 OK in the function body, there is LOG.info("example") that does not get logged either. Is there a way to make FastAPI logging …

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