Commands
Instal Fast API - pip install fastapi "uvicorn[standard]"
Run the Fast API
python -m univorn main:app --reload
uvicorn main:app --reload
-
main is name of our module
-
app is the the instance of our application
-
reload will make the server automatically if there are any changes
-
Incase if it doesn't work
Port Information
Default port - http://localhost:8000
Swagger UI - http://localhost:8000/docs
API Documentation - http://localhost:8000/redoc
Status Codes
100-199 - Informational Responses
200-299 - Successfull Responses
300-399 - Redirectional Responses
400-499 - Client Error Responses
500-599 - Server Error Responses