EcoLogits
Tracks the energy consumption and environmental impacts of using generative AI models through APIs.
https://github.com/mlco2/ecologits
Keywords
genai generative-ai green-ai green-software llm llm-inference python sustainability sustainable-ai
Last synced: 3 days ago
JSON representation
Acceptance Criteria
- Revelant topics? true
- External users? true
- Open source license? true
- Active? true
- Fork? false
Repository metadata
🌱 EcoLogits tracks the energy consumption and environmental footprint of using generative AI models through APIs.
- Host: GitHub
- URL: https://github.com/mlco2/ecologits
- Owner: mlco2
- License: mpl-2.0
- Created: 2024-02-02T16:25:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-05-20T18:19:19.000Z (10 days ago)
- Last Synced: 2026-05-23T08:03:36.795Z (8 days ago)
- Topics: genai, generative-ai, green-ai, green-software, llm, llm-inference, python, sustainability, sustainable-ai
- Language: Python
- Homepage: https://ecologits.ai/
- Size: 14.1 MB
- Stars: 285
- Watchers: 13
- Forks: 27
- Open Issues: 10
- Releases: 33
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.md
- License: LICENSE
- Citation: CITATION.cff
README.md
🌱 EcoLogits tracks the energy consumption and environmental impacts of using generative AI models through APIs.
Read the full documentation on ecologits.ai.
EcoLogits is part of the CodeCarbon non-profit, chat with us on Discord.
⚙️ Installation
pip install ecologits
For integration with a specific provider, use pip install ecologits[openai]. We are currently supporting the following providers: anthropic, cohere, google-genai, huggingface-hub, mistralai and openai. See the full list of providers.
🚀 Usage
from ecologits import EcoLogits
from openai import OpenAI
# Initialize EcoLogits
EcoLogits.init(providers=["openai"])
client = OpenAI(api_key="<OPENAI_API_KEY>")
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{"role": "user", "content": "Tell me a funny joke!"}
]
)
# Get estimated environmental impacts of the inference
print(f"Energy consumption: {response.impacts.energy.value.mean} kWh")
print(f"GHG emissions: {response.impacts.gwp.value.mean} kgCO2eq")
See package documentation on EcoLogits
💚 Sponsors
💪 Contributing
To get started with setting up a development environment and making a contribution to EcoLogits, see Contributing to EcoLogits.
⚖️ License
This project is licensed under the terms of the Mozilla Public License Version 2.0 (MPL-2.0).
Citation (CITATION.cff)
cff-version: "1.2.0"
authors:
- family-names: Rincé
given-names: Samuel
orcid: "https://orcid.org/0009-0000-0739-6114"
- family-names: Banse
given-names: Adrien
orcid: "https://orcid.org/0000-0002-4456-6618"
doi: 10.5281/zenodo.15601289
message: If you use this software, please cite our article in the
Journal of Open Source Software.
preferred-citation:
authors:
- family-names: Rincé
given-names: Samuel
orcid: "https://orcid.org/0009-0000-0739-6114"
- family-names: Banse
given-names: Adrien
orcid: "https://orcid.org/0000-0002-4456-6618"
date-published: 2025-07-09
doi: 10.21105/joss.07471
issn: 2475-9066
issue: 111
journal: Journal of Open Source Software
publisher:
name: Open Journals
start: 7471
title: "EcoLogits: Evaluating the Environmental Impacts of Generative
AI"
type: article
url: "https://joss.theoj.org/papers/10.21105/joss.07471"
volume: 10
title: "EcoLogits: Evaluating the Environmental Impacts of Generative
AI"
Owner metadata
- Name: CodeCarbon
- Login: mlco2
- Email:
- Kind: organization
- Description:
- Website: https://codecarbon.io
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/54071934?v=4
- Repositories: 7
- Last ynced at: 2025-11-12T05:34:26.578Z
- Profile URL: https://github.com/mlco2
GitHub Events
Total
- Delete event: 8
- Member event: 2
- Pull request event: 8
- Fork event: 2
- Discussion event: 1
- Watch event: 6
- Issue comment event: 3
- Push event: 28
- Create event: 4
Last Year
- Delete event: 8
- Member event: 2
- Pull request event: 8
- Fork event: 2
- Discussion event: 1
- Watch event: 6
- Issue comment event: 3
- Push event: 28
- Create event: 4
Committers metadata
Last synced: 5 days ago
Total Commits: 809
Total Committers: 17
Avg Commits per committer: 47.588
Development Distribution Score (DDS): 0.341
Commits in past year: 264
Committers in past year: 8
Avg Commits per committer in past year: 33.0
Development Distribution Score (DDS) in past year: 0.299
| Name | Commits | |
|---|---|---|
| Samuel Rince | s@r****e | 533 |
| Adrien Banse | a****e@u****e | 173 |
| luc | l****n@t****m | 32 |
| Chieh | h****0@g****m | 19 |
| Caroline Jean-Pierre | 1****e | 18 |
| Nina P | 2****v | 7 |
| vinh | v****4@h****r | 5 |
| Jay DesLauriers | 3****l | 4 |
| Luc BERTON | l****n@g****m | 4 |
| sauraisg | g****s@g****m | 3 |
| Clovis Varangot-Reille | 1****i | 2 |
| Romain ROCHAS | 4****m | 2 |
| Yoann Couble | y****e@v****r | 2 |
| Luc | l****c@t****r | 2 |
| DataForGood (Tech) | 1****h | 1 |
| Thilo Michael | u****o@g****m | 1 |
| dtamien | 7****n | 1 |
Committer domains:
- test.fr: 1
- valraiso.fr: 1
- test.com: 1
- uclouvain.be: 1
- rince.me: 1
Issue and Pull Request metadata
Last synced: 8 days ago
Total issues: 2
Total pull requests: 12
Average time to close issues: 11 days
Average time to close pull requests: 4 days
Total issue authors: 2
Total pull request authors: 4
Average comments per issue: 1.5
Average comments per pull request: 0.33
Merged pull request: 9
Bot issues: 0
Bot pull requests: 0
Past year issues: 2
Past year pull requests: 12
Past year average time to close issues: 11 days
Past year average time to close pull requests: 4 days
Past year issue authors: 2
Past year pull request authors: 4
Past year average comments per issue: 1.5
Past year average comments per pull request: 0.33
Past year merged pull request: 9
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- samuelrince (1)
- fraboniface (1)
Top Pull Request Authors
- samuelrince (9)
- Popidge (1)
- dtamien (1)
- vinisha231 (1)
Top Issue Labels
- bug (1)
Top Pull Request Labels
Dependencies
- actions/checkout v4 composite
- astral-sh/setup-uv v7 composite
- actions/checkout v4 composite
- astral-sh/setup-uv v7 composite
- 139 dependencies
- actions/checkout v4 composite
- astral-sh/setup-uv v7 composite
- samuelcolvin/check-python-version v4.1 composite
- actions/checkout v4 composite
- astral-sh/setup-uv v7 composite
- actions/cache v1 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- pre-commit/action v3.0.0 composite
- pre-commit ^2.20.0 develop
- pytest ^7.2.0 develop
- tox ^4.4.8 develop
- python >=3.8,<4
Score: 8.520188700396037