Skip to content

kamacharovs/aiof-metadata

Repository files navigation

Overview

All in one finance data crunching backend

Build Status

API

API documentation

Financial independence (FI)

Financial Independence is based on the FIRE movement. Financial Independence, Retire Early (FIRE) is a movement dedicated to a program of extreme savings and investment that allows proponents to retire far earlier than traditional budgets and retirement plans would allow. By dedicating up to 70% of income to savings, followers of the FIRE movement may eventually be able to quit their jobs and live solely off small withdrawals from their portfolios decades before the conventional retirement age of 65. More information can be found here

API endpoinds available are

Financial independence

/api/fi/time
/api/fi/rule/of/72
/api/fi/added/time
/api/fi/ten/million/dream/{monthlyInvestment}
/api/fi/compound/interest
/api/fi/investment/fees/effect
/api/fi/cost/of/raising/children
/api/fi/cost/of/raising/children/families
/api/fi/savings/rate
/api/fi/health/bmi/imperial
/api/fi/health/bmi/metric
/api/fi/coast/savings

Asset

Asset functionality and analysis

API endpoints available are

/api/asset/breakdown

Property

Property functionality and analysis

API endpoints available are

/api/property/mortgage

How to run it

In order to run the API locally, you would first need to run the python .\setup.py develop script, if it hasn't been setup locally before, in additional the installing the requirements. Afterwards, start the API via uvicorn

python -m pip install -r .\requirements.txt
python .\setup.py develop
uvicorn api.main:app

Docker

Build it

docker build -t aiof-metadata .

Run it

docker run -it --rm -p 8000:80 aiof-metadata

Make API calls to

http://localhost:8080/

(Optional) clean up <none> images

docker rmi $(docker images -f dangling=true -q)

Tests

Unit tests are used to test units of code. Below you can see how to run them

How to run unit tests

cd .\tests\
pytest

Documentation

Overall documentation

Package management

  • Install package: python -m pip install <package-name>
  • Uninstall package: python -m pip uninstall <package-name>

Libraries

FastAPI

Helpful FastAPI documentation

Pydantic

Helpful pydantic documentation

Pandas

Helpful pandas documentation

Python

Helpful python documentation