- Python 3
- Flask
- Flask SQL Alchemy
- MariaDB
- Docker (if database is ran in a container)
./init_app.pyis the main application file./config.pycontains all configuration properties./appcontains application's source code./shop-api.postman_collection.jsoncontains a Postman collection to test the REST API
- Install Docker (used to host the database)
- Install MariaDB
docker run --name mariadb -e MYSQL_ROOT_PASSWORD=mypass -p 3306:3306 -d docker.io/library/mariadb:10.4 - Install Python 3.8
- Install Python pip
- Install all pip packages listed in
requirements.txt(pip install -r requirements.txt on Linux) - Install
python3-mysqldbpackage if the server is ran on Linux - Create a DB schema
- In order to start the server, run the following command:
python3 init_app.py - If server is started successfully, a message should appear, displaying
Running on <...> (Press CTRL+C to quit)
- Use the provided Postman collection for local API testing
- Further API documentation is provided in Swaggerhub documentation