🌱 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!
Metadata
Release files for greenfootprint 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| greenfootprint-0.1.4.tar.gz | 3.8 kB | Without provenance | Details for greenfootprint-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| greenfootprint-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for greenfootprint-0.1.4-py3-none-any.whl |
Total release size: 8.2 kB
Release files / greenfootprint-0.1.4.tar.gz
| Download URL | greenfootprint-0.1.4.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a57290b571a03449943520080307048a7093cd2ef8e758ce6d71a972795f9d25
|
|
BLAKE2b-256 checksum How to use checksums |
87aa11f24e1814dd8773e6148c3e16d8904c3ff1e755afac186341688568a130
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / greenfootprint-0.1.4-py3-none-any.whl
| Download URL | greenfootprint-0.1.4-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
daaf2c380c4d5abd63e6908d9e5214897d759341ae39deb2e77ae9ef77de18cf
|
|
BLAKE2b-256 checksum How to use checksums |
68c139c3ffea123361bf9212265fd0ff869a2ab371b2eca2d37013c4839982cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for greenfootprint 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.