cpi
Quickly adjust U.S. dollars for inflation using the Consumer Price Index (CPI)
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, uses permissive MIT licensing, and installs with low friction. It solves a common data-wrangling task (inflation adjustment) with a clean API. Install it if you regularly work with historical U.S. financial data or need to normalize dollar amounts across years.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a pure-Python wheel and four common dependencies.
- Active maintenance with a recent commit on 2026-05-19 and stable production status.
License · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
last release 2026-01-13 (213 days) · last repo commit 2026-05-19 · 145 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 139,204 downloads/mo, #11,303 on PyPI
Alternatives
Verify before relying
pip install cpi
import cpi
# Adjust dollars from one year to another
adjusted = cpi.inflate(amount, start_year, end_year)
print(adjusted)- Whether the package fetches live CPI data or relies on bundled historical tables, and update frequency
- CLI interface capabilities and command syntax beyond the Python API
- Specific example values and year ranges supported by the inflate function
What it is and what it does
CPI is a Python library for converting U.S. dollar amounts between different years using the Consumer Price Index, accounting for inflation. It lets you answer questions about what a dollar amount from one year is worth in another year by applying official CPI data to your calculations.
The package wraps CPI data into a simple API backed by requests, click, python-dateutil, and pandas. It's designed for quick, straightforward inflation adjustments in data analysis, financial reporting, or historical comparisons without needing to manually source or parse CPI tables yourself.
Use it for
- Normalize historical salary or wage data to a common year for fair comparison across time periods
- Convert historical prices or costs to present-day equivalents for financial analysis or reporting
- Adjust historical budget figures or grant amounts to account for inflation when planning projects
- Build data pipelines that automatically inflation-adjust time-series economic data for analysis
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, uses permissive MIT licensing, and installs with low friction. It solves a common data-wrangling task (inflation adjustment) with a clean API. Install it if you regularly work with historical U.S. financial data or need to normalize dollar amounts across years.
Install
cpi on PyPI
Before you install
Low install friction with a pure-Python wheel and four common dependencies. Active maintenance with a recent commit on 2026-05-19 and stable production status.
License in practice
MIT license is permissive, allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install cpi
import cpi
# Adjust dollars from one year to another
adjusted = cpi.inflate(amount, start_year, end_year)
print(adjusted)
Verify before relying
- Whether the package fetches live CPI data or relies on bundled historical tables, and update frequency
- CLI interface capabilities and command syntax beyond the Python API
- Specific example values and year ranges supported by the inflate function
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesrequestsclickpython-dateutilpandas |
| Maintenance | Actively maintained 213 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 139,204 / month, #11,303 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.9 |
Evidence: cpi-2.0.10-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “inflation adjustment CPI”
- cpiAdjusts U.S. dollar amounts for inflation using the Consumer Price…
- openbb-imfProvides a provider extension for the OpenBB platform that exposes…
- color-operationsApplies color-oriented image operations—gamma adjustment, sigmoidal…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also forex-python · spm-calculator · CurrencyConverter · prices · price-parser · iso4217 · currency-symbols · py-money · hdx-python-country · django-money