AI can benefit society in many ways. But given the amount of energy that’s needed to support AI’s computing requirements, these benefits can come at a high environmental price. CodeCarbon is a lightweight software package that can be seamlessly integrated into a company’s Python code base. The software estimates the amount of carbon dioxide that will be produced by the cloud computing resources needed to execute the code. It then shows developers how they can lessen emissions by optimizing their code or by hosting their cloud infrastructure in regions that use renewable energy.