Skip to main content

flake8-ecocode

What it is

A port to Python of the Python-specific parts of ecoCode.

Java Code has been converted to Python, using the ast module.

What is ecoCode?

ecoCode is a collective project aiming to reduce environmental footprint of software at the code level. The goal of the project is to provide a list of static code analyzers to highlight code structures that may have a negative ecological impact: energy and resources over-consumption, "fatware", shortening terminals' lifespan, etc.

Installation

pip install flake8-ecocode

or from source:

git clone https://github.com/abilian/flake8-ecocode.git
cd flake8-ecocode
pip install .

Development

Setup

git clone https://github.com/abilian/flake8-ecocode.git
cd flake8-ecocode
poetry install

Run tests

make test
make lint

or against various Python versions:

nox

Current status

Only 2 checkers have been converted so far out of 11 currently in ecoCode-python.

Contributing

Please contribute to flake8-ecocode by porting the remaining checkers from ecoCode, and adding more.

The documentation from ecoCode also needs to be ported.

You can also contribute by adding tests, documentation, or improving the code.

TODO

  • Convert the remaining checkers
  • Add tests
  • Add CI/CD
  • Add documentation

Metadata

Release files for flake8-ecocode 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flake8-ecocode 0.1.3
File Size Uploaded Provenance Actions
flake8_ecocode-0.1.3.tar.gz 59.4 kB Without provenance Details for flake8_ecocode-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flake8-ecocode 0.1.3
File Interpreter ABI Platform Actions
flake8_ecocode-0.1.3-py3-none-any.whl Python 3 none any Details for flake8_ecocode-0.1.3-py3-none-any.whl

Total release size: 64.1 kB

Release files / flake8_ecocode-0.1.3.tar.gz

Download URL flake8_ecocode-0.1.3.tar.gz
Size 59.4 kB
Tags Source
SHA-256 checksum
How to use checksums
48849e3f9d8f1263b69898b67a512a0a970f3eb569d8ccc5ba71be3e6ae0019f
BLAKE2b-256 checksum
How to use checksums
3608caa96d7ae907a877833968cd135a24127d23ba1f27243d8e95eca9851f75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release files / flake8_ecocode-0.1.3-py3-none-any.whl

Download URL flake8_ecocode-0.1.3-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d285d37aa95d52a9b0baf85b0f7bc79818f425e0d99a0a1de830ef64fa69088
BLAKE2b-256 checksum
How to use checksums
0adcc12c21710906e77a483ab7d29f9d77b85fc40fe0dc5ac9aa07b8556c08d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Security for flake8-ecocode 0.1.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page