--- id: cpi version: "2.0.10" license: MIT license_treatment: permissive maintenance: active --- # cpi — Quickly adjust U.S. dollars for inflation using the Consumer Price Index (CPI) License: permissive · Maintenance: active · Downloads: 139.2K/mo ## 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 above — verify before relying. Adjusts U.S. dollar amounts for inflation using the Consumer Price Index, converting values to a target year's equivalent purchasing power. 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 pip install cpi uv add cpi poetry add cpi ## Installing cpi 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: unspecified - Install friction: low - Maintenance: active - Downloads: 139.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags inflation adjustment CPI, convert dollars for inflation, consumer price index calculator, historical dollar value, adjust currency inflation US, CPI inflation calculator, purchasing power adjustment, inflation, economics, data-wrangling [View on SkillFed](https://skillfed.io/packages/cpi) · [View on PyPI](https://pypi.org/project/cpi/)