-
Install
python3
. -
Install poetry as package manager from here.
-
Install dependencies with poetry in a venv with
poetry install
-
Start the flask server with:
export PYTHONPATH="$PWD" && poetry run python expensesapp/app.py
-
(Optional) Run the tests
poetry run pytest
The app is divided into 3 layers.
- The models layer is responsible for the database models stored into sqlite3.
- The service layer is doing most of the work:
- It includes its own models used for validation and serialization.
- There are
Transaction
child classes for every transaction type. - It has a
transaction_factory
responsible for converting to the properTransaction
child class. - It has a _load and _save method to convert to and from DB models.
- The controller (app) layer is used for the presentation and also parses the csv files.
- Write more tests. Unit/E2E
- Add logging.
- Documentation on the methods
- Add flask error handlers and blueprints
- Optimization
- Chunks on the csv input file.