Skip to content

A loan prediction tool based on a machine learning model using lending club data deployed with fast-api and docker.

Notifications You must be signed in to change notification settings

nickvandewiele/lending_club

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lending Club

Continuous Integration and Delivery

A loan prediction tool based on a machine learning model using lending club data inspired by a Kaggle notebook

Skeleton using fast-api and docker inspired by Testdriven.io course and this fastapi/ml template.

Requirements

Python 3.6+

Installation

Install the required packages in your local environment (ideally virtualenv, conda, etc.).

pip install -r requirements

Setup

  1. Duplicate the .env.example file and rename it to .env

  2. In the .env file configure the API_KEY entry. The key is used for authenticating our API.
    A sample API key can be generated using Python REPL:

import uuid
print(str(uuid.uuid4()))

Run It

  1. Start your app with:
uvicorn app.main:app
  1. Go to http://localhost:8000/docs.

  2. Click Authorize and enter the API key as created in the Setup step. Authroization

  3. You can use the sample payload from the docs/loan_payload.json file when trying out the model using the API.

Run Tests

If you're not using tox, please install with:

pip install tox

Run your tests with:

tox

This runs tests and coverage for Python 3.6 and Flake8, Autopep8, Bandit.

About

A loan prediction tool based on a machine learning model using lending club data deployed with fast-api and docker.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages