Downpyment
Just a tiny lib to help with mortgage analysis and visualization in Python.
Installation
You can install the package via pip:
pip install downpyment
Usage
The central class is the mortgage one
from downpyment.mortgage import Mortgage, Interest, YEARLY_INTEREST_SCALE, Investment
from downpyment.reporting import MortgageReport
mortgage = Mortgage(
property_price=450_000,
interest=Interest(rate=1.85, scale=YEARLY_INTEREST_SCALE, perc=True),
n_steps=30,
downpayment=0,
tax_perc=8,
)
mortgage.simulate()
The main goal is to generate a report as follows:
ep_params = {
"amount": 5_000,
"pay_each": 12,
}
investment = Investment(
initial_amount=120_000,
step_contribution=ep_params["amount"] / ep_params["pay_each"],
interest=Interest(rate=5.0, scale=YEARLY_INTEREST_SCALE, perc=True),
tax_perc=20,
)
MortgageReport(mortgage).report(ep_params=ep_params, inflation_p=2.0, investment=investment)
This will generate a report like this one:
Mortgage simulation with early payments
Mortgage vs investment curves
Check the scripts/simulate.py file for a complete example.
Metadata
Release files for downpyment 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| downpyment-0.1.1.tar.gz | 336.2 kB | Without provenance | Details for downpyment-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| downpyment-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for downpyment-0.1.1-py3-none-any.whl |
Total release size: 343.4 kB
Release files / downpyment-0.1.1.tar.gz
| Download URL | downpyment-0.1.1.tar.gz |
|---|---|
| Size | 336.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
813174217938f16b78cac03481fe0e978338a70190bd717b35527000ee30095a
|
|
BLAKE2b-256 checksum How to use checksums |
b480607bac0bcddcd863e0ca5bc71da3b4e1739cef0e2e45013a16560d6a170e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.8
|
Release files / downpyment-0.1.1-py3-none-any.whl
| Download URL | downpyment-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
947fa5c7825a7bdd182d1e8c4f691ab8fe99e617fa6170c6d9d0df2561ffc390
|
|
BLAKE2b-256 checksum How to use checksums |
e9967e88a4c62af924245e3e8c5a81eae747bf8acc797cdd034dc8eda3023a6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.8
|
Security for downpyment 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.