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. Why does my FastAPI application redirect to HTTP and not HTTPS?

    Jan 13, 2025 · In my case adding nginx headers and fastapi config for the proxy headers did not work. I had to hardcode the replacement of http to https in the 307 redirect responses (through a …

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

    Aug 29, 2023 · 1. Setting up the uvicorn logger Straight from the documentation: Logging --log-config <path> - Logging configuration file. Options: dictConfig() formats: .json, . yaml. Any other format will …

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

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

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

  8. FastAPI/uvicorn not working when specifying host [duplicate]

    The FastAPI/uvicorn server is not working when specifying the host.

  9. FastAPI throws an error (Error loading ASGI app. Could not import ...

    fastapi run <file or package where your FastAPI app instance is> So FastAPI will under the hood take care of the uvicorn command stuff for you

  10. FastAPI CORS error despite correctly configured CORSMiddleware

    Aug 20, 2025 · The code works locally but when I put it on an EC2 machine and change the CORS origins accordingly it fails. I've checked the URL for 2 hours straight. I copied and pasted it from the …