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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8_ecocode-0.1.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flake8_ecocode-0.1.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file flake8_ecocode-0.1.2.tar.gz.

File metadata

  • Download URL: flake8_ecocode-0.1.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for flake8_ecocode-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5cbf77cce106f890f9ce6b7e0fa94b4564e8304e76179511f452c93a878640b2
MD5 20702fd0b059cc9adebc1563d3068af2
BLAKE2b-256 3bddb92a120d0ce08cbe124ef8657cc09d92977ad7ecfca77393df59bf4ba133

See more details on using hashes here.

File details

Details for the file flake8_ecocode-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: flake8_ecocode-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for flake8_ecocode-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ab64fb8a2ec23f35047980d040e6ada69747d9cef5b935c312e5df22e23bdd47
MD5 2afc52c5433c06bdb151ad2d7e658898
BLAKE2b-256 440d80a11aed8f385f60e2e7b51159032b2f64f44848f4a3b982f285f1ece9ff

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.3

2 files

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

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