skillfed

flake8-executable

A Flake8 plugin for checking executable permissions and shebangs.

flake8-executable v2.1.3 238.0K downloads/30d#8,949 on PyPI20
Copyleft license LGPL v3+ Active released

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-executable

uv

uv add flake8-executable

poetry

poetry add flake8-executable

Installing 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

Environment :: ConsoleFramework :: Flake8Intended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance

Tags

flake8 executable permissionsshebang linterpython file permissions checkerexecutable bit validationshebang syntax checker
flake8-pluginlinting

More Python Modules packages