Python library for calculating amortizations and generating amortization schedules
Project description
amortization
Python library for calculating amortizations and generating amortization schedules
License | Version | ||
Github Actions | Coverage | ||
Supported versions | Wheel | ||
Status | Downloads |
Support
If you like amortization
or if it is useful to you, show your support by buying me a coffee.
Installation
pip install amortization
Usage
Python
Amortization Amount
from amortization.amount import calculate_amortization_amount
amount = calculate_amortization_amount(150000, 0.1, 36)
Amortization Schedule
from amortization.schedule import amortization_schedule
for number, amount, interest, principal, balance in amortization_schedule(150000, 0.1, 36):
print(number, amount, interest, principal, balance)
Amortization Schedule (using tabulate)
from amortization.schedule import amortization_schedule
from tabulate import tabulate
table = (x for x in amortization_schedule(150000, 0.1, 36))
print(
tabulate(
table,
headers=["Number", "Amount", "Interest", "Principal", "Balance"],
floatfmt=",.2f",
numalign="right"
)
)
Command line
amortize -h
usage: amortize [-h] -P PRINCIPAL -n PERIOD -r INTEREST_RATE [-s]
Python library for calculating amortizations and generating amortization
schedules
optional arguments:
-h, --help show this help message and exit
-s, --schedule Generate amortization schedule
required arguments:
-P PRINCIPAL, --principal PRINCIPAL
Principal amount
-n PERIOD, --period PERIOD
Total number of periods
-r INTEREST_RATE, --interest-rate INTEREST_RATE
Interest rate per period
amortize -P 150000 -n 36 -r 0.1 -s
Dependencies
Author
References
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
amortization-1.1.0.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for amortization-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd30ea6b2b7d075f200c2776a884fbcf1f0b6bbfde6eca1fe3d39e8ceff90d83 |
|
MD5 | 3bfa0cdf2f7d720f3c59d6d2e5dc3cd8 |
|
BLAKE2b-256 | 9a89559b09c1c43bac72e7a2a9c602564889a48267df3a3563ccbf086122083a |