xenon
Monitor code metrics for Python on your CI server
Decision gist · record as of 2026-08-14
Yes, if you need lightweight complexity enforcement in CI or pre-commit workflows and can accept dormant maintenance. The package is stable and does one job well, but expect no active support or updates; if you require ongoing maintenance or advanced complexity analysis features, consider alternatives. No known vulnerabilities and low install friction make it a low-risk addition to existing pipelines.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 2.7 or 3.6+ (classifiers indicate support through 3.12); xenon measures cyclomatic complexity via radon, so results depend on radon's analysis capabilities.
- Low friction install with three straightforward runtime dependencies (radon, requests, PyYAML).
- Maintenance is dormant—last release was 662 days ago—so expect no active bug fixes or feature updates, though the package remains functional for its narrow purpose.
License · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing commercial and private use with minimal restrictions; you may use, modify, and distribute xenon freely as long as you include the license notice.
last release 2024-10-21 (662 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,359,618 downloads/mo, #4,004 on PyPI
Alternatives
Verify before relying
pip install xenon
xenon --max-absolute B --max-modules A --max-average A /path/to/code- Whether dormant maintenance (662 days since last release) affects compatibility with recent Python patch releases or modern CI platforms.
- Whether the package's complexity thresholds (A–F ranks) align with your team's code quality standards without requiring custom configuration.
What it is and what it does
Xenon is a command-line tool that wraps Radon to measure cyclomatic complexity across a Python codebase and enforce complexity thresholds. It calculates three metrics: average complexity across all blocks, per-module complexity, and absolute complexity of individual blocks, each ranked from A (simplest) to F (most complex). You set thresholds for each metric, and xenon exits with a non-zero code if any threshold is violated, making it suitable for blocking commits or failing CI builds when code becomes too complex.
Typically used in two contexts: as a pre-commit hook to prevent overly complex code from entering version control, or as a CI step to monitor complexity trends over time. It accepts glob patterns to exclude or ignore files and directories, and integrates with pre-commit frameworks. The package depends on radon for the actual complexity analysis, requests for potential HTTP operations, and PyYAML for configuration parsing.
Use it for
- Enforce complexity limits in a CI/CD pipeline to prevent code from becoming unmaintainable as features are added.
- Block commits via a pre-commit hook when a developer introduces a function or module exceeding your team's complexity threshold.
- Monitor average codebase complexity over time to catch gradual increases in technical debt.
- Set per-module complexity caps to ensure no single module becomes a maintenance bottleneck.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lightweight complexity enforcement in CI or pre-commit workflows and can accept dormant maintenance.
The package is stable and does one job well, but expect no active support or updates; if you require ongoing maintenance or advanced complexity analysis features, consider alternatives. No known vulnerabilities and low install friction make it a low-risk addition to existing pipelines.
Install
xenon on PyPI
Before you install
Low friction install with three straightforward runtime dependencies (radon, requests, PyYAML). Maintenance is dormant—last release was 662 days ago—so expect no active bug fixes or feature updates, though the package remains functional for its narrow purpose.
Requires Python 2.7 or 3.6+ (classifiers indicate support through 3.12); xenon measures cyclomatic complexity via radon, so results depend on radon's analysis capabilities.
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions; you may use, modify, and distribute xenon freely as long as you include the license notice.
Quickstart
pip install xenon
xenon --max-absolute B --max-modules A --max-average A /path/to/code
Verify before relying
- Whether dormant maintenance (662 days since last release) affects compatibility with recent Python patch releases or modern CI platforms.
- Whether the package's complexity thresholds (A–F ranks) align with your team's code quality standards without requiring custom configuration.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesradonrequestsPyYAML |
| Maintenance | Dormant 662 days since the last release |
| First released | |
| Downloads | 1,359,618 / month, #4,004 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.1Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality AssuranceTopic :: Utilities |
Evidence: xenon-0.9.3-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “python code complexity monitoring”
- xenonXenon monitors Python code complexity by measuring cyclomatic…
- instanaInstana is a Python instrumentation package that automatically…
- mccabeMeasures cyclomatic complexity of Python functions and integrates…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also coverage-threshold · lizard · radon · mccabe · flake8-cognitive-complexity · complexipy · flake8-expression-complexity · pysentry-rs · flake8-annotations-complexity · mozsystemmonitor