vermin
Concurrently detect the minimum Python versions needed to run code
What it is and what it does
Vermin is a command-line tool that scans Python source code to determine the minimum Python version required to run it. It works by parsing code into an abstract syntax tree (AST) and matching language features against an internal ruleset covering Python 2.0–2.7 and 3.0–3.14. The tool has no external dependencies and can run on Python 3.0 or later, even when analyzing code that uses Python 2.x syntax.
The package is designed for developers who need to know or enforce minimum version requirements for their projects. It detects a wide range of language features—from basic syntax like f-strings and async/await to advanced constructs like pattern matching, type aliases, and generic classes. It integrates with CI/CD pipelines and pre-commit hooks, and supports configuration files for specifying target versions. The project is well-tested with thousands of unit and integration tests.
Use it for:
- Check a project's minimum Python version requirement before publishing or deploying to ensure compatibility claims are accurate.
- Enforce minimum version constraints in CI/CD pipelines by failing builds when code uses features beyond the target version.
- Integrate as a pre-commit hook to catch version-incompatible features before they are committed.
- Audit legacy codebases to identify which Python versions they actually support, independent of documentation.
- Guide refactoring decisions by showing which modern language features are available at a given minimum version.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Vermin analyzes Python source code to detect the minimum Python versions needed to run it, by parsing code into an AST and matching against internal rules covering Python 2.0–2.7 and 3.0–3.14.
Yes. Vermin is a mature, actively maintained tool with no external dependencies, permissive licensing, and strong test coverage. It solves a concrete problem—determining minimum Python version requirements—with a comprehensive ruleset and multiple integration points. Install it if you need to verify or enforce Python version compatibility in your projects.
Install
vermin on PyPI
pip
pip install verminuv
uv add verminpoetry
poetry add verminInstalling vermin
Before you install
Installation is straightforward with no runtime dependencies. The package is actively maintained, with a recent release and an active repository. It runs on modern Python versions and is well-tested across Linux, macOS, and Windows.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install vermin
vermin /path/to/your/project
Requires Python 3.0 or later to run Vermin itself; the tool can still detect Python 2.x features in the code it analyzes.
Verify before relying
- Whether the 4140 rules, 190 modules, and other detection metrics remain current with Python 3.14 and beyond.
- How accurately the heuristics for union types and fstring self-doc detection perform in real-world codebases.
- Whether the tool scales well for very large projects or monorepos.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 267 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 501,234/month — #6,316 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: vermin-1.8.0-py3-none-any.whl
Keywords: version, detection, analysis, ast, development
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
detect_agentDetects whether code is running in an AI agent…
unclear · top 15,000 on PyPI
safetySafety CLI scans Python project dependencies…
permissive · top 5,000 on PyPI
yamllintyamllint checks YAML files for syntax errors,…
copyleft · top 1,000 on PyPI
dodgyDodgy scans Python source code for suspicious…
permissive · top 15,000 on PyPI
flake8-polyfillProvides compatibility helpers for Flake8…
permissive · top 5,000 on PyPI
types-smorestProvides type stubs for flask-smorest, enabling…
copyleft · top 5,000 on PyPI
lib-detect-testenvDetects whether code is running in a test…
permissive · top 5,000 on PyPI
pyconfiguratorParses command-line arguments and INI…
permissive · top 15,000 on PyPI
future-fstringsEnables f-string syntax in Python versions…
permissive · top 15,000 on PyPI
fawltydepsFawltydeps identifies undeclared dependencies…
permissive · top 15,000 on PyPI