A simple API to manage loan payments for a fintech
- Loan management
- Payments control
- Outstanding balance
This application can be deployed to Heroku with just one click at the button. 🥳
For more deploy options take a look at Django's official documentation.
The following guidelines will help you to have a copy ready and running of the project so you can play around, make changes and improvements.
The application was built using Django framework with Django-Rest framework extension. It shares the same basic characteristics and requirements any other Python software based on Django.
- Python 3
- Pip
- Django
- Django-Rest
- SQLite (or any other supported database)
These are optional but recommended.
First, you need a copy of the source code, you can download it here or clone the project. To clone the project you need Git, if you don't have it installed go to the official site and follow the instructions, if you already have it just open a terminal application and enter the following commands.
$ cd desired/path/
$ git clone https://github.com/squad-4/loan-management-system
The next step is install the project's Python dependencies. Just like Git if you still don't have it go to the official site and get it done. You'll also need Pip, same rules applys here. Another interesting tool that is not required but strongly recommended is Pipenv, it helps to manage dependencies and virtual envinronments.
Installing with Pip:
$ cd path/to/loan-project
$ pip install --upgrade django djangorestframework # and any other optional packages
Installing with Pipenv:
$ pip install --upgrade pipenv
$ cd path/to/loan-project
$ pipenv sync -d
Finally, configure the application. This will require you to define a few variables and create the database.
Note 1 - If you are using Pipenv you need to start a shell loading the apps virtual environment before run any Python command. Just enter the following.
$ pipenv shell
Note 2 - By default Django applications uses SQLite, but you can use any other supported database, take a look here to choose one. For the purpose of this example we will use the default (SQLite) and assuming it's already installed.
$ python manage.py migrate
Django has a development server to make it easy run applications for testing and debug.
$ python manage.py runserver
That's it!
If you intend to contribute, instead of just making a copy from the original repository you have to fork the project on GitHub into your own account, then clone from the fork and send pull requests with your changes.
Two of the optional dependencies become mandatory, Black and Pre-commit, you need to install them in order to validate the coding style adopted by the project. If you are using Pipenv you may already have them, otherwise run pip install --upgrade black pre-commit
.
Install Pre-commit rules.
$ cd path/to/loan-project
$ pre-commit install # remember to load a shell first if using Pipenv
This project is part of the final challenge for the Acelera DEV - Python para Web program promoted by Codenation running between april and may of 2019.
The project specification is available here.
This project is licensed under the GNU License - see the License file for details.