Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 1.14 KB

File metadata and controls

37 lines (22 loc) · 1.14 KB

🌱 EcoCode: Real-Time Carbon Footprint Tracker for Python Code

Python 3.8+ License: MIT

Measure your Python code's environmental impact in real-time!

EcoCode helps you write more sustainable code by tracking energy consumption, calculating CO2 emissions, and suggesting optimizations. Perfect for climate-conscious developers.

🎯 Why I Built This

As a robotics engineer in Berlin, I noticed we optimize code for speed and memory, but never for environmental impact. EcoCode bridges this gap by making sustainability measurable.

⚡ Quick Start

from ecocode import eco_monitor

@eco_monitor def your_function():

Your code here

return "Hello, green world!"

your_function()

📊 What You Get

  • Real-time energy monitoring during code execution
  • CO2 emissions calculation based on regional grid
  • Tree-hours needed to offset your code's impact
  • Easy decorator for any function

🔧 Installation

pip install psutil

python ecocode.py