About 13,600,000 results
Open links in new tab
  1. 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 …

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

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

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

  6. How to run FastAPI app on multiple ports? - Stack Overflow

    Oct 20, 2021 · I have a FastAPI application that I am running on port 30000 using Uvicorn programmatically. Now I want to run the same application on port 8443 too. The same application …

  7. Video Streaming App using FastAPI and OpenCV - Stack Overflow

    Aug 31, 2020 · Below are given two options (with complete code samples) on how to stream (live) video using FastAPI and OpenCV. Option 1 demonstrates an approach based on your question using the …

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

  9. fastapi - How to return status code in response correctly ... - Stack ...

    Jul 6, 2021 · So I am learning FastAPI and I am trying to figure out how to return the status code correctly. I made an endpoint for uploading a file and I want to make a special response in case the …

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

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