Skip to main content

I Bonds

This is a python library that calculates the current value of a Series I Savings Bond. The historic rates are supplied via a data file which is updated every time a new rate is released by Treasury Direct.

Installation

This project can be installed from PyPi. To install via pip:

pip install ibonds

Or, via pipx

pipx install ibonds

Or, on Arch Linux, you can install it from AUR via AUR helpers or directly

yay -S python-ibonds

Example code

from ibonds import IBond

ibond = IBond('01/2010', 10_000)  # $10,000 I-Bond bought in Jan 2010
print(f'Fixed Rate: {ibond.fixed_rate()}')
print(f'Current Composie Rate: {ibond.composite_rate()}')
print(f'Current value: {ibond.value()}')

from datetime import date  # For historic rates and values.

d = date(2020, 1, 1)  # Jan 1, 2020
print(f'Composie Rate on Jan 1, 2020: {ibond.composite_rate(d)}')
print(f'Value on Jan 1, 2020: {ibond.value(d)}')

If you are interested in tracking more than one I Bond, and would prefer a command line interface, please check out lakshmi. If you like a spreadsheet instead, eyebonds.info is a great resource.

Acknowledgements

I would like to acknowledge eyebonds.info and Bogleheads websites which I used to understand I Bond interest rate calculations.

Disclaimer

This library has no link to official Treasury Direct website. No claim is made for any accuracy of data that you generate using this code. Although I have tried my best to implement the formula presented in Tresury Direct, the values returned by this module might be incorrect. When in doubt, go to the official Treasury Direct website to verify any and all information.

Metadata

Release files for ibonds 1.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ibonds 1.0.10
File Size Uploaded Provenance Actions
ibonds-1.0.10.tar.gz 6.5 kB Without provenance Details for ibonds-1.0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ibonds 1.0.10
File Interpreter ABI Platform Actions
ibonds-1.0.10-py3-none-any.whl Python 3 none any Details for ibonds-1.0.10-py3-none-any.whl

Total release size: 12.2 kB

Release files / ibonds-1.0.10.tar.gz

Download URL ibonds-1.0.10.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
89c9af2bf8139fcc21e864e312e0157b5b34918552ce418194fe5fb8528d350c
BLAKE2b-256 checksum
How to use checksums
dda972dd50ff3fbe09078505f7da3bf184dae9c3ea7a5b1ef2c915c138fd7972
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / ibonds-1.0.10-py3-none-any.whl

Download URL ibonds-1.0.10-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d1c4c4a25cbb3ec0e0f4b8a87977ebb9753348729bb34f770d1311caeb814d2
BLAKE2b-256 checksum
How to use checksums
a125ceb624c1f6538ccea6559ee11fae76e43742b8c874bde2d434e2342f2178
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for ibonds 1.0.10

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page