{"id":13520968,"url":"https://github.com/genai-impact/ecologits","last_synced_at":"2025-04-05T02:04:45.431Z","repository":{"id":223467899,"uuid":"751927947","full_name":"genai-impact/ecologits","owner":"genai-impact","description":"🌱 EcoLogits tracks the energy consumption and environmental footprint of using generative AI models through APIs.","archived":false,"fork":false,"pushed_at":"2025-04-03T15:39:37.000Z","size":5061,"stargazers_count":147,"open_issues_count":12,"forks_count":13,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-04T13:14:57.234Z","etag":null,"topics":["genai","generative-ai","green-ai","green-software","llm","llm-inference","python","sustainability","sustainable-ai"],"latest_commit_sha":null,"homepage":"https://ecologits.ai/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/genai-impact.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-02T16:25:32.000Z","updated_at":"2025-04-03T15:38:47.000Z","dependencies_parsed_at":"2024-02-20T12:29:07.345Z","dependency_job_id":"038359e8-24c5-4afc-9574-ec3a953f28df","html_url":"https://github.com/genai-impact/ecologits","commit_stats":{"total_commits":476,"total_committers":10,"mean_commits":47.6,"dds":0.3529411764705882,"last_synced_commit":"0cd0df2b05690a73e2afa3f9353ef32c26e8f512"},"previous_names":["dataforgoodfr/12_genai_impact","genai-impact/ecologits"],"tags_count":19,"template":false,"template_full_name":"dataforgoodfr/d4g-project-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genai-impact%2Fecologits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genai-impact%2Fecologits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genai-impact%2Fecologits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genai-impact%2Fecologits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/genai-impact","download_url":"https://codeload.github.com/genai-impact/ecologits/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276163,"owners_count":20912288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["genai","generative-ai","green-ai","green-software","llm","llm-inference","python","sustainability","sustainable-ai"],"created_at":"2024-08-01T06:00:25.265Z","updated_at":"2025-04-05T02:04:45.424Z","avatar_url":"https://github.com/genai-impact.png","language":"Python","funding_links":[],"categories":["🛠 Tools","Tools","Consumption"],"sub_categories":["Code-Based Tools","Tools for measuring and quantifying footprint","Computation and Communication"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/genai-impact/ecologits/main/docs/assets/logo_dark.png\"\u003e\n    \u003cimg alt=\"EcoLogits\" src=\"https://raw.githubusercontent.com/genai-impact/ecologits/main/docs/assets/logo_light.png\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n🌱 **EcoLogits** tracks the energy consumption and environmental impacts of using generative AI models through APIs.\n\n[![PyPI version](https://img.shields.io/pypi/v/ecologits?color=00bf63)](https://pypi.org/project/ecologits/)\n[![PyPI downloads](https://static.pepy.tech/badge/ecologits/month)](https://pepy.tech/projects/ecologits)\n[![Python version](https://img.shields.io/pypi/pyversions/ecologits)](https://pypi.org/project/ecologits/)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1VxrpJ5xuWZKQLsSN12kdqUqkppHRct3G?usp=sharing)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15132099.svg)](https://doi.org/10.5281/zenodo.15132099)\n\n\nEcoLogits was created and is actively maintained by the **[GenAI Impact](https://genai-impact.org/) non-profit**. \n\nRead the full **documentation on [ecologits.ai](https://ecologits.ai/)**.\n\n\n## ⚙️ Installation\n\n```shell\npip install ecologits\n```\n\nFor integration with a specific provider, use `pip install ecologits[openai]`. We are currently supporting the following providers: `anthropic`, `cohere`, `google-generativeai`, `huggingface-hub`, `mistralai` and `openai`. See the full [list of providers](https://ecologits.ai/latest/tutorial/providers/).\n\n## 🚀 Usage\n\n```python\nfrom ecologits import EcoLogits\nfrom openai import OpenAI\n\n# Initialize EcoLogits\nEcoLogits.init()\n\nclient = OpenAI(api_key=\"\u003cOPENAI_API_KEY\u003e\")\n\nresponse = client.chat.completions.create(\n    model=\"gpt-4o-mini\",\n    messages=[\n        {\"role\": \"user\", \"content\": \"Tell me a funny joke!\"}\n    ]\n)\n\n# Get estimated environmental impacts of the inference\nprint(f\"Energy consumption: {response.impacts.energy.value} kWh\")\nprint(f\"GHG emissions: {response.impacts.gwp.value} kgCO2eq\")\n```\n\nSee package documentation on [EcoLogits](https://ecologits.ai/)\n\n## 💚 Sponsors\n\n\n\u003ca href=\"https://resilio-solutions.com/\" target=\"_blank\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/genai-impact/ecologits/main/docs/assets/sponsors/resilio.png\" alt=\"Resilio\" height=\"100\" width=\"250\"\u003e\n\u003c/a\u003e\n\n\n## 💪 Contributing\n\nTo get started with setting up a development environment and making a contribution to EcoLogits, see [Contributing to EcoLogits](https://ecologits.ai/latest/contributing/).\n\n## ⚖️ License\n\nThis project is licensed under the terms of the [Mozilla Public License Version 2.0 (MPL-2.0)](https://www.mozilla.org/en-US/MPL/2.0/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenai-impact%2Fecologits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenai-impact%2Fecologits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenai-impact%2Fecologits/lists"}