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: about 20 hours 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: genai-impact
- License: mpl-2.0
- Created: 2024-02-02T16:25:32.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-24T14:09:55.000Z (16 days ago)
- Last Synced: 2026-01-25T02:13:12.828Z (16 days ago)
- Topics: genai, generative-ai, green-ai, green-software, llm, llm-inference, python, sustainability, sustainable-ai
- Language: Python
- Homepage: https://ecologits.ai/
- Size: 8.74 MB
- Stars: 248
- Watchers: 12
- Forks: 23
- Open Issues: 10
- Releases: 30
-
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.
⚙️ 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 & benefactors
💪 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: GenAI Impact
- Login: genai-impact
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/166227099?v=4
- Repositories: 1
- Last ynced at: 2024-04-17T18:43:17.216Z
- Profile URL: https://github.com/genai-impact
GitHub Events
Total
- Create event: 47
- Commit comment event: 3
- Release event: 10
- Delete event: 26
- Member event: 1
- Pull request event: 81
- Fork event: 13
- Issues event: 43
- Watch event: 127
- Issue comment event: 88
- Push event: 219
- Pull request review comment event: 52
- Pull request review event: 53
Last Year
- Create event: 37
- Commit comment event: 3
- Release event: 8
- Delete event: 20
- Pull request event: 66
- Fork event: 11
- Issues event: 28
- Watch event: 87
- Issue comment event: 70
- Push event: 161
- Pull request review comment event: 49
- Pull request review event: 43
Issue and Pull Request metadata
Last synced: 16 days ago
Total issues: 48
Total pull requests: 160
Average time to close issues: 28 days
Average time to close pull requests: 4 days
Total issue authors: 24
Total pull request authors: 13
Average comments per issue: 1.1
Average comments per pull request: 0.66
Merged pull request: 137
Bot issues: 0
Bot pull requests: 0
Past year issues: 20
Past year pull requests: 72
Past year average time to close issues: 5 days
Past year average time to close pull requests: 5 days
Past year issue authors: 17
Past year pull request authors: 9
Past year average comments per issue: 1.2
Past year average comments per pull request: 0.67
Past year merged pull request: 56
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- samuelrince (9)
- adrienbanse (8)
- NP4567-dev (5)
- ExploratoriumGPT (2)
- gecBurton (2)
- Zeitsperre (2)
- Neyri (2)
- cvarrei (2)
- flebarbe (1)
- claraadam (1)
- jaywonchung (1)
- vdwow (1)
- leokeba (1)
- 252afh (1)
- TLSDC (1)
Top Pull Request Authors
- samuelrince (74)
- adrienbanse (49)
- cjean-pierre (12)
- LucBERTON (5)
- NP4567-dev (5)
- ycouble (3)
- Zeitsperre (2)
- C-BdB (2)
- cvarrei (2)
- thilomichael (2)
- HsuChieh (2)
- aqwvinh (1)
- yipfram (1)
- gregoirevilde-se (1)
Top Issue Labels
- feature request (15)
- bug (13)
- documentation (3)
- question (1)
Top Pull Request Labels
- documentation (2)
Dependencies
- actions/cache v1 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- pre-commit/action v3.0.0 composite
- cachetools 5.3.2
- cfgv 3.4.0
- chardet 5.2.0
- colorama 0.4.6
- distlib 0.3.8
- exceptiongroup 1.2.0
- filelock 3.13.1
- identify 2.5.35
- iniconfig 2.0.0
- nodeenv 1.8.0
- packaging 23.2
- platformdirs 4.2.0
- pluggy 1.4.0
- pre-commit 2.21.0
- pyproject-api 1.6.1
- pytest 7.4.4
- pyyaml 6.0.1
- setuptools 69.1.0
- tomli 2.0.1
- tox 4.13.0
- virtualenv 20.25.0
- pre-commit ^2.20.0 develop
- pytest ^7.2.0 develop
- tox ^4.4.8 develop
- python >=3.8,<4
Score: -Infinity