flake8-executable
A Flake8 plugin for checking executable permissions and shebangs.
What it is and what it does
flake8-executable is a Flake8 plugin that enforces correct executable permissions and shebang lines in Python files. It runs automatically whenever you invoke flake8 and reports five specific error codes: EXE001 (shebang present but file not executable), EXE002 (file executable but no shebang), EXE003 (shebang missing "python"), EXE004 (whitespace before shebang), and EXE005 (blank or comment lines before shebang).
The plugin integrates directly into your existing Flake8 workflow with no additional configuration needed beyond installation. It depends only on flake8 itself and supports Python 3.7 through 3.11. The package is actively maintained, has no known security vulnerabilities, and is used by thousands of developers monthly.
Use it for:
- Enforce consistent shebang and executable-bit conventions in a team's Python codebase during CI/CD linting.
- Catch accidentally executable Python files or missing shebangs in command-line scripts before they cause runtime issues.
- Validate that all Python entry points have correct shebangs and permissions in a package distribution.
- Detect malformed shebangs (e.g., missing 'python' keyword) that could prevent scripts from running correctly.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Flake8 plugin that detects and reports mismatches between Python file executable permissions and shebang lines, catching five specific permission and shebang errors.
Yes, if you use Flake8 and want to enforce executable-permission and shebang correctness. The plugin is lightweight, has no security vulnerabilities, and integrates seamlessly into your existing linting workflow. The copyleft license is not a barrier for most development use. Install it if your team or project cares about consistent script permissions; skip it if you don't distribute or run Python files as executables.
Install
flake8-executable on PyPI
pip
pip install flake8-executableuv
uv add flake8-executablepoetry
poetry add flake8-executableInstalling flake8-executable
Before you install
Low install friction; depends only on flake8. Actively maintained with recent commits; last release was over a year ago but the repository remains active and the package supports current Python versions.
License in practice
Licensed under LGPL v3+, a copyleft license. You may use and modify the package freely, but any derivative work must also be distributed under LGPL v3+ or a compatible license.
Quickstart
pip install flake8-executable
flake8 your_script.py
# Reports EXE001–EXE005 errors inline with other flake8 checks
Verify before relying
- Whether the plugin integrates transparently with existing flake8 configurations or requires explicit setup.
- Whether the five error codes (EXE001–EXE005) cover all common executable/shebang mismatches or if edge cases exist.
Package facts
| License | LGPL v3+ (copyleft) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — flake8 |
| Maintenance | actively maintained — 1,299 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 238,042/month — #8,949 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flake8_executable-2.1.3-py3-none-any.whl
Keywords: flake8, linter, qa
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
flake8Flake8 is a command-line tool that combines…
permissive · top 1,000 on PyPI
wemake-python-styleguideA flake8 plugin that enforces strict,…
permissive · top 15,000 on PyPI
flake8-broken-lineA flake8 plugin that detects and forbids…
permissive · top 15,000 on PyPI
flake8-loggingA Flake8 plugin that detects and flags common…
permissive · top 15,000 on PyPI
flake8-use-pathlibA flake8 plugin that detects uses of os and…
permissive · top 15,000 on PyPI
flake8-noqaA flake8 plugin that validates the formatting…
copyleft · top 5,000 on PyPI
executable-applicationA minimal executable application package…
unclear · top 15,000 on PyPI
flake8-tupleA flake8 plugin that detects unintended…
permissive · top 15,000 on PyPI
flake8-blind-exceptA flake8 plugin that detects overly broad…
permissive · top 15,000 on PyPI
dlintDlint is a flake8 plugin that adds…
permissive · top 15,000 on PyPI