About 7,380,000 results
Open links in new tab
  1. fastapi @app.on_event decorator is deprecated, how can I create a ...

    Feb 22, 2024 · I have the following decorator that works perfectly, but fastapi says @app.on_event ("startup") is deprecated, and I'm unable to get @repeat_every () to work with …

  2. python - How can I install fastapi properly? - Stack Overflow

    Dec 26, 2021 · The OP is trying to install fastapi[all] which seems to require compiling from source. No, I don't agree with you, I just provided the viable solution and I use it all the time. …

  3. python - Address already in use - FastAPI - Stack Overflow

    Oct 29, 2020 · I keep getting [Errno 98] Address already in use But the address is not in use. I tried to change the ip and port but It isn't budging. from fastapi import FastAPI app = FastAPI …

  4. How to initialize a global object or variable and reuse it in every ...

    from fastapi import FastAPI, Request from contextlib import asynccontextmanager @asynccontextmanager async def lifespan(app: FastAPI): ''' Run at startup Initialize the Client …

  5. Performance results differ between run_in_threadpool () and run_in ...

    Mar 28, 2024 · Using run_in_threadpool() FastAPI is fully compatible with (and based on) Starlette, and hence, with FastAPI you get all of Starlette's features, such as …

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

  7. How to define multiple API endpoints in FastAPI with different …

    Nov 19, 2022 · How to define multiple API endpoints in FastAPI with different paths but the same path parameter? Asked 2 years, 11 months ago Modified 2 years, 2 months ago Viewed 11k …

  8. How can I run the FastAPI server using Pycharm? - Stack Overflow

    Jul 12, 2020 · PyCharm Professional now lets you select FastAPI as your project type. Even if you didn't start that way, there is an associated FastAPI run config template that you can use on …

  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 …

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