pysen
Python linting made easy. Also a casual yet honorific way to address individuals who have entered an organization prior to you.
What it is and what it does
This package is a configuration and execution layer for Python linting tools. Instead of managing separate configuration files for black, flake8, isort, and mypy, you write a single configuration (in pysen.toml or pyproject.toml) that describes linting preferences at a higher level of abstraction. The package then generates the appropriate tool-specific configuration files on the fly and runs each linter with those settings.
The package does not install or manage linter versions itself—you install those separately via pip, pipenv, or poetry—but it coordinates their execution and ensures their configurations align with your declared preferences. It supports both CLI usage and programmatic configuration through Python scripts, and integrates with editors. The package is not a linter itself; it is a wrapper and orchestrator that reduces configuration boilerplate across a team's toolchain.
Use it for:
- Set up consistent linting across a team by committing a single configuration file instead of managing multiple separate linter configs.
- Run format and lint checks in CI/CD pipelines with a single command that applies all configured tools.
- Generate persistent linter configuration files for IDE integration, then point your editor to those files.
- Extend with custom plugins to orchestrate additional tools or customize how existing linters are invoked.
- Enforce a strict mypy preset across a codebase while keeping other linter settings flexible.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Orchestrates multiple Python linters (black, flake8, isort, mypy) from a single configuration file, generating and running their settings automatically without managing dependency versions.
Yes. Actively maintained with no known vulnerabilities and low install friction. Worth installing if you want to centralize linter configuration and reduce boilerplate across multiple tools. The main trade-off is that you must manage linter versions separately; this package does not lock them for you. If your team already uses multiple linters and wants a single source of truth for their settings, the benefit is substantial.
Install
pysen on PyPI
pip
pip install pysenuv
uv add pysenpoetry
poetry add pysenInstalling pysen
Before you install
Low friction: pure Python wheel with five runtime dependencies (colorlog, dacite, gitpython, tomlkit, unidiff). Actively maintained with recent release and no known vulnerabilities.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use and modify freely in most contexts.
Quickstart
pip install "pysen[lint]"
Create pysen.toml:
[tool.pysen]
version = "0.12"
[tool.pysen.lint]
enable_black = true
enable_flake8 = true
enable_isort = true
enable_mypy = true
Then run:
pysen run lint
pysen run format
Requires Python 3.10 or later. Only checks files tracked in git by default; untracked files are skipped unless PYSEN_IGNORE_GIT=1 is set.
Verify before relying
- Whether separately-installed linter versions are reliably compatible with the orchestration layer
- Performance impact on large codebases with many files
- Extent of customization possible through the plugin interface beyond documented examples
- How mypy_preset="strict" interacts with other mypy configuration options
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — colorlog, dacite, gitpython, tomlkit, unidiff |
| Maintenance | actively maintained — 24 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,249,674/month — #4,162 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pysen-0.12.1-py3-none-any.whl
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
lintrunnerLintrunner orchestrates and runs multiple…
unclear · top 5,000 on PyPI
lintrunner-adaptersProvides adapter integrations for lintrunner,…
permissive · top 5,000 on PyPI
nbqaRuns standard Python linters and formatters…
permissive · top 15,000 on PyPI
Flake8-pyprojectFlake8-pyproject enables Flake8 to read its…
permissive · top 5,000 on PyPI
pyproject-flake8Enables flake8 linting to read configuration…
unclear · top 15,000 on PyPI
import-linterImport Linter enforces architectural…
permissive · top 5,000 on PyPI
flake8-isortIntegrates isort into flake8 linting, reporting…
copyleft · top 5,000 on PyPI
python-lsp-serverImplements the Language Server Protocol for…
permissive · top 5,000 on PyPI
dlintDlint is a flake8 plugin that adds…
permissive · top 15,000 on PyPI