skillfed

vermin

Concurrently detect the minimum Python versions needed to run code

vermin v1.8.0 501.2K downloads/30d#6,316 on PyPI524
Permissive license MIT Active released

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 vermin

uv

uv add vermin

poetry

poetry add vermin

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3.0Topic :: Software DevelopmentTopic :: Utilities

Tags

minimum python version detectionpython compatibility checkerast-based version analysispython code version requirementsdetect python version neededpython compatibility analysis toolversion requirement scanner
version-detectioncode-analysiscompatibility-checker

More Software Development packages