Install & Compatibility
Where this runs
tested against v2.0.10 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 228.4MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 8.6s · import 0.000s · 221MB
228MB installed
● package 228MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
cpi.to_usd
✓ from cpi import to_usd
✗ import cpi; cpi.to_usd()
Direct import is the common pattern; avoid relying on module-level import for the function.
adjust
✓ from cpi import adjust
✗ import cpi; cpi.adjust()
adjust is the recommended API; from cpi import adjust is cleaner.
Adjust $100 from 1990 to 2023 dollars.
from cpi import to_usd
print(to_usd(100, 1990, 2023))
cpi --version
Upgrade
Version history
2.0.10latest on PyPI · released Jan 13, 2026
Audit
Dependencies
requestsrequiredFetch CPI data from FRED API
pandasoptionalData handling and time series operations