Make sure you have pyenv on your system.
pyenv virtualenv 3.11.0 my_fastapi_envpyenv activate my_fastapi_env
pip install -r requirements.txtMake sure you are in the directory where main.py is located, then run:
uvicorn main:app --reload- Visit http://127.0.0.1:8000/docs for the Swagger UI.
- Visit http://127.0.0.1:8000/redoc for the ReDoc documentation.