Metadata-Version: 2.4
Name: rakam-frugal-ai
Version: 2026.6.15
Summary: Carbon intensity data registry for LLM and embedding models with live Electricity Maps updates
Project-URL: Homepage, https://github.com/Rakam-AI/emission-tracker
Project-URL: Repository, https://github.com/Rakam-AI/emission-tracker
Project-URL: Issues, https://github.com/Rakam-AI/emission-tracker/issues
Author-email: Samuel Gerardin <samuel@rakam.ai>
License: MIT
License-File: LICENSE
Keywords: carbon,co2,electricity-maps,emissions,llm,sustainability
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic-settings>=2.2.1
Requires-Dist: pydantic>=2.7.0
Requires-Dist: python-dotenv>=1.0.1
Provides-Extra: dev
Requires-Dist: anyio>=4.0.0; extra == 'dev'
Requires-Dist: black>=24.3.0; extra == 'dev'
Requires-Dist: build>=1.0.0; extra == 'dev'
Requires-Dist: mypy>=1.9.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.26.0; extra == 'dev'
Requires-Dist: pytest-cov>=6.2.1; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: respx>=0.21.0; extra == 'dev'
Requires-Dist: ruff>=0.4.5; extra == 'dev'
Description-Content-Type: text/markdown

# rakam-frugal-ai

Carbon intensity data registry for LLM and embedding models, with live updates from the [Electricity Maps](https://www.electricitymaps.com/) API.

Ships a precomputed, weighted-by-region probability table for popular models (GPT-4o, GPT-4o-mini, Claude, embedding models, …) and refreshes the underlying datacenter carbon intensities on demand from a free Electricity Maps API key.

## Install

```bash
pip install rakam-frugal-ai
```

## Usage

```python
import rakam_frugal_ai as ci

m = ci.model("gpt-4o")
print(m.CI)              # weighted carbon intensity, gCO2eq/kWh
print(m.size_billion_params)
print(m.datacenter_regions)
```

## API key

Live refreshes require a (free) Electricity Maps API key. Set it in your environment:

```bash
export ELECTRICITY_MAPS_API_KEY=your-key-here
```

Without the key the library still works using the bundled snapshot; it just can't refresh values.

## Python support

Python 3.10, 3.11, 3.12.

## License

MIT — see [LICENSE](LICENSE).
