Skip to content

Latest commit

Β 

History

History
40 lines (26 loc) Β· 1.1 KB

File metadata and controls

40 lines (26 loc) Β· 1.1 KB

🌱 greenfootprint

greenfootprint is a lightweight Python tool that estimates the energy consumption and carbon footprint of any Python script. It helps developers measure the environmental impact of their code in terms of runtime, CPU usage, energy, and COβ‚‚ emissions.

πŸ™‹ About the Author

Author – thuve-codes – LinkedIn


πŸ“¦ Features

  • πŸ” Analyze energy and carbon usage of a Python script
  • βš™οΈ Uses runtime and CPU time to estimate watt-hours
  • 🌫️ Converts energy usage to estimated COβ‚‚ grams
  • πŸ“Š Simple CLI with clean output
  • 🧠 Tips to improve efficiency (coming soon)

πŸ› οΈ Installation & RUN

pip install greenfootprint

greenfootprint examples\example_script.py

Sample Output

πŸ” Running analysis on: examples/example_script.py

πŸ“Š Analysis Report for examples/example_script.py ⏱️ Runtime: 2.37 seconds 🧠 CPU Time: 2.10 seconds πŸ”‹ Energy Used: 0.0088 kWh 🌫️ COβ‚‚ Emitted: 4.16 grams

βœ… Your code is moderately green!