Metadata-Version: 2.1
Name: cpilib
Version: 0.3.1
Summary: Library for handling CPI data
License: MIT
Author: Thomas Kientz
Author-email: thomas@kientz.net
Requires-Python: >=3.9
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pandas (>=2.2.0,<3.0.0)
Requires-Dist: plotly (>=5.15.0,<6.0.0)
Requires-Dist: pyarrow (>=15.0.0,<16.0.0)
Requires-Dist: tqdm (>=4.65.0,<5.0.0)
Description-Content-Type: text/markdown

## **CPI-Lib**

Python Library to handle CPI data.

### **Installation**

```bash
pip install cpilib
```

### **Usage**

```python
from cpilib import HICP

# Will fetch new data if the data from cache (if any)
# is older than 1 week (time_limit in days)
hicp = HICP.from_cache(time_limit=7) 

# COICOP code
node = 'CP01'
# Country code
country = 'DE'

# DataFrame of the prices of the children of (node, country)
price_children = hicp.prices.children(node, country)

# DataFrame of the weights of the children of (node, country)
weight_children = hicp.weights.children(node, country)

# Series of the weights of (node, country)
total_weight = hicp.weights.node(node, country) # Yearly (int)
```
