This project was inspired by an assignment from one of my courses at STU FEI University in the subject Object-Oriented Programming (OOP).
I reworked the assignment into Python and added some extra logic to a few endpoints.
Old Assigement: https://github.com/Interes-Group/zadanie-3-eshop-PyKej
Old Swagger: https://app.swaggerhub.com/apis-docs/sk-stuba-fei-uim-oop/OOP_Zadanie_3/1.0.0#/
pip install fastapi uvicorn
uvicorn main:app --reload
Explanation of the command:
main
β the filename (main.py
)app
β the FastAPI instance (app = FastAPI()
)--reload
β automatically restarts the server when you change the code
Open one of the following in your browser:
- API root: π http://127.0.0.1:8000/
- Interactive docs (Swagger UI): π http://127.0.0.1:8000/docs
- Alternative docs (ReDoc): π http://127.0.0.1:8000/redoc