A small Flask application for keeping track of what you own and what it is worth in złoty. Assets are stored with their own currency, and the value in PLN is computed from the National Bank of Poland's daily rate table.
Written as a recruitment exercise, so the scope is deliberately narrow: CRUD over one table, one external API, no accounts and no authentication.
NBP publishes one table per working day, so fetching it per request would be
193 identical HTTP calls to serve one page. get_todays_rates() in
app.py checks the rates table first and only calls
https://api.nbp.pl/api/exchangerates/tables/a/last/1/ when today's table is
not already stored. The asset list then converts against the newest date it
holds, which means the app keeps working when the API is unreachable, showing
the last rates it saw rather than an error page.
Assets marked is_pln skip conversion entirely.
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
flask --app app runThe SQLite file is created on first start under instance/, which is not
tracked.
| Route | Does |
|---|---|
/assets |
list everything, with a PLN column and the rate date used |
/assets/create |
add an asset |
/asset/<id> |
detail |
/asset/<id>/edit |
edit |
/asset/<id>/delete |
delete, with a confirmation step |
Asset carries name, value, currency, an is_pln flag and created/updated
timestamps in Europe/Warsaw. Rate is one row per currency per publication
date, which is what makes the cache a lookup rather than a single overwritten
row.
MIT, see LICENSE.