Skip to content

Fun project for an expenses app. Tech used: Python, Flash, SQLAlchemy, SQLite3

Notifications You must be signed in to change notification settings

ThanKarab/expenses_webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expenses Web App

Tech used: Python, Flask, SqlAlchemy, Sqlite3

Installation

  1. Install python3.

  2. Install poetry as package manager from here.

  3. Install dependencies with poetry in a venv with poetry install

  4. Start the flask server with:

    export PYTHONPATH="$PWD" && poetry run python expensesapp/app.py 
    
  5. (Optional) Run the tests

    poetry run pytest 
    

Explanation

The app is divided into 3 layers.

  1. The models layer is responsible for the database models stored into sqlite3.
  2. The service layer is doing most of the work:
    1. It includes its own models used for validation and serialization.
    2. There are Transaction child classes for every transaction type.
    3. It has a transaction_factory responsible for converting to the proper Transaction child class.
    4. It has a _load and _save method to convert to and from DB models.
  3. The controller (app) layer is used for the presentation and also parses the csv files.

Things that could be added

  1. Write more tests. Unit/E2E
  2. Add logging.
  3. Documentation on the methods
  4. Add flask error handlers and blueprints
  5. Optimization
  6. Chunks on the csv input file.

About

Fun project for an expenses app. Tech used: Python, Flash, SQLAlchemy, SQLite3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages