Python library for mortgage calculations.
Project description
# py-mortgagekit
## Build Status
[![Build Status](https://travis-ci.org/MikaSoftware/py-mortgagekit.svg?branch=master)](https://travis-ci.org/MikaSoftware/py-mortgagekit)
[![PyPI version fury.io](https://badge.fury.io/py/py-mortgagekit.svg)](https://pypi.python.org/pypi/py-mortgagekit)
[![Coverage Status](https://coveralls.io/repos/github/MikaSoftware/py-mortgagekit/badge.svg?branch=master)](https://coveralls.io/github/MikaSoftware/py-mortgagekit?branch=master)
## Description
Python library for mortgage calculations.
## Installation
### Requirements
* Python 3.6++
### Instructions
```bash
pip instll py-mortgagekit
```
## Usage
### Development
Here is an example of using the using the library in your code.
```python
from mortgagekit.constants import *
from mortgagekit.calculator import *
# Define our variables.
total_amount = Money(amount=250000.00, currency="USD")
down_payment = Money(amount=50000.00, currency="USD")
amortization_year = 25
annual_interest_rate = Decimal(0.04)
payment_frequency = MORTGAGEKIT_MONTH # see calculator.py for more options.
compounding_period = MORTGAGEKIT_SEMI_ANNUAL
first_payment_date = '2008-01-01'
# Feel free to use an alternate currency type by first checking to see if your
# your currency is supported here:
# https://github.com/limist/py-moneyed/blob/master/moneyed/localization.py#L348
currency='USD'
# Load up our calculator.
calc = MortgageCalculator(total_amount, down_payment, amortization_year,
annual_interest_rate, payment_frequency, compounding_period,
first_payment_date, currency)
# Perform computations.
payment_schedule = calc.mortgage_payment_schedule()
# You can now inspect the results and use it for your purposes.
print(payment_schedule)
```
### Quality Assurance
#### Unit Tests
If you want to run the unit tests, you can run the following.
Here is how you run the unit tests.
```bash
python setup.py test
```
#### Code Coverage
Here is how you run code coverage. The first command runs the code coverage
and the second command provides a report. If you would like to know more about ``coverage`` then click to [here to read](http://coverage.readthedocs.io/en/latest/).
```bash
coverage run --source=mortgagekit setup.py test
coverage report -m
```
## License
This library is licensed under the **BSD** license. See [LICENSE.md](LICENSE.md) for more information.
## Build Status
[![Build Status](https://travis-ci.org/MikaSoftware/py-mortgagekit.svg?branch=master)](https://travis-ci.org/MikaSoftware/py-mortgagekit)
[![PyPI version fury.io](https://badge.fury.io/py/py-mortgagekit.svg)](https://pypi.python.org/pypi/py-mortgagekit)
[![Coverage Status](https://coveralls.io/repos/github/MikaSoftware/py-mortgagekit/badge.svg?branch=master)](https://coveralls.io/github/MikaSoftware/py-mortgagekit?branch=master)
## Description
Python library for mortgage calculations.
## Installation
### Requirements
* Python 3.6++
### Instructions
```bash
pip instll py-mortgagekit
```
## Usage
### Development
Here is an example of using the using the library in your code.
```python
from mortgagekit.constants import *
from mortgagekit.calculator import *
# Define our variables.
total_amount = Money(amount=250000.00, currency="USD")
down_payment = Money(amount=50000.00, currency="USD")
amortization_year = 25
annual_interest_rate = Decimal(0.04)
payment_frequency = MORTGAGEKIT_MONTH # see calculator.py for more options.
compounding_period = MORTGAGEKIT_SEMI_ANNUAL
first_payment_date = '2008-01-01'
# Feel free to use an alternate currency type by first checking to see if your
# your currency is supported here:
# https://github.com/limist/py-moneyed/blob/master/moneyed/localization.py#L348
currency='USD'
# Load up our calculator.
calc = MortgageCalculator(total_amount, down_payment, amortization_year,
annual_interest_rate, payment_frequency, compounding_period,
first_payment_date, currency)
# Perform computations.
payment_schedule = calc.mortgage_payment_schedule()
# You can now inspect the results and use it for your purposes.
print(payment_schedule)
```
### Quality Assurance
#### Unit Tests
If you want to run the unit tests, you can run the following.
Here is how you run the unit tests.
```bash
python setup.py test
```
#### Code Coverage
Here is how you run code coverage. The first command runs the code coverage
and the second command provides a report. If you would like to know more about ``coverage`` then click to [here to read](http://coverage.readthedocs.io/en/latest/).
```bash
coverage run --source=mortgagekit setup.py test
coverage report -m
```
## License
This library is licensed under the **BSD** license. See [LICENSE.md](LICENSE.md) for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file py-mortgagekit-1.0.3b1.tar.gz
.
File metadata
- Download URL: py-mortgagekit-1.0.3b1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5dc75d93ee4e9404fe43893c2647d82a86612af0fa485db031db5d6c8265090 |
|
MD5 | 3d27de2ceaf67eec737d033109d52be4 |
|
BLAKE2b-256 | 2a7e40c05b074d3d0533e20b663e5b9ddd04d4281d37e1aa66c78c644083b159 |
File details
Details for the file py_mortgagekit-1.0.3b1-py2.py3-none-any.whl
.
File metadata
- Download URL: py_mortgagekit-1.0.3b1-py2.py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0377195f7e7a054ac9604ea21f3f73141a41ea946bf5c8dda26d8732e5324b56 |
|
MD5 | 20d97c914f6ffac5e43f9fc386fe0027 |
|
BLAKE2b-256 | 2d18a2e06e82ddb7659b76d0f7008b04fdc1000cf7aa8d26351611c1310f79f1 |