All in one finance data crunching backend
API documentation
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
/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 functionality and analysis
API endpoints available are
/api/asset/breakdown
Property functionality and analysis
API endpoints available are
/api/property/mortgage
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
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)
Unit tests are used to test units of code. Below you can see how to run them
cd .\tests\
pytest
Overall documentation
- Install package:
python -m pip install <package-name>
- Uninstall package:
python -m pip uninstall <package-name>
- fastapi
- uvicorn
- pandas
- pandas-datareader
- statistics
- numpy-financial
- pytest
- list of py finance libraries
Helpful FastAPI
documentation
- Settings and Environment Variables
- Bigger Applications - Multiple Files
- Dependencies - First Steps
- Concurrency and async / await
- Custom Response - HTML, Stream, File, others
- Middleware
- Handling Errors
- tiangolo/uvicorn-gunicorn-fastapi-docker
Helpful pydantic
documentation
Helpful pandas
documentation
Helpful python
documentation