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

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

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

  6. How to Upload a large File (≥3GB) to FastAPI backend?

    Aug 22, 2022 · The example below demonstrates an approach, which was initially presented in this answer, on how to upload a file in a fast way compared to the one documented by FastAPI.

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

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

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

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

  10. Newest 'fastapi' Questions - Stack Overflow

    Mar 23, 2026 · FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints. Sign up to watch this tag and see more …