Backend for the shop status and appointment service using flask and sqlalchemy
This is a python project using poetry
.
You'll need python ≥ 3.6.
-
Get poetry:
$ pip install [--user] poetry
-
Copy the env-template and fill in the config
$ cp env-template .env
-
Install dependencies
$ poetry install
-
Run database migrations
$ poetry run flask db upgrade
-
Run the unit tests
$ poetry run python -m pytest
-
Start app in debug mode
FLASK_DEBUG=true poetry run flask run
-
You can add some random data to the database using
$ poetry run python examples/fill_some_data.py
-
httpie is a great http cli, e.g. you can look at the customer data for a shop:
http :5000/api/shops/1/customers
When poetry.lock has conflicts, don't bother resolving them by hand.
Delete the file and recreate it by running poetry install
.