codecarbon
Track and reduce CO2 emissions from your computing
Track and reduce CO2 emissions from your computing
To install this package, run one of the following:
CodeCarbon is a Python package that estimates the carbon emissions produced by computer programs, from straightforward algorithms to deep neural networks.
It measures the electricity consumed by the machine it runs on and converts it to CO2 using the carbon intensity of the local electricity grid, taking into account your computing infrastructure, location, usage and running time. It can be used as a Python context manager, a decorator, or from the command line, and works either standalone or by reporting to the CodeCarbon API and dashboard.
Summary
Track and reduce CO2 emissions from your computing
Last Updated
Sep 10, 2026 at 07:56
License
MIT
Supported Platforms
GitHub Repository
https://github.com/mlco2/codecarbonDocumentation
https://docs.codecarbon.io/