Skip to content

thuve-codes/greenfootprint-pythonpackage-pypi

Repository files navigation

🌱 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

Authorthuve-codesLinkedIn


📦 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!

About

Python First Package

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages