radon
Code Metrics in Python
Decision gist · record as of 2026-08-14
Yes, with conditions. Radon is stable and widely used (5.7M monthly downloads, top 5000 packages), with no known vulnerabilities and low install friction. However, the project is dormant—no releases in over a year and no commits since October 2024. Install it if you need code metrics for analysis or CI integration, but do not expect active maintenance or support for very recent Python versions. For active monitoring and CI enforcement, consider xenon as an alternative.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- On Windows or systems with non-UTF-8 default encoding, set the RADONFILESENCODING environment variable to UTF-8 to analyze files with Unicode characters.
- Low install friction with only two runtime dependencies (mando and colorama).
- Dormant maintenance status—last release was over a year ago and no commits since October 2024—but the package is marked Production/Stable and has accumulated 2005 repository stars.
License · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing commercial and private use with minimal restrictions.
last release 2023-03-26 (1237 days) · last repo commit 2024-10-20 · 2,005 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,780,891 downloads/mo, #2,038 on PyPI
Alternatives
Verify before relying
pip install radon
radon cc mymodule.py -a
# Or programmatically:
from radon.complexity import cc_visit
with open('mymodule.py') as f:
results = cc_visit(f.read())- Whether the package remains actively maintained or is effectively unmaintained despite Production/Stable status
- Compatibility with Python versions beyond 3.8 (classifiers list up to 3.9 but description mentions 3.8 as the upper bound)
What it is and what it does
Radon is a static analysis tool that measures code quality through multiple metrics. It computes cyclomatic complexity (how many independent paths flow through code), raw metrics like lines of code and comment density, Halstead metrics (effort and difficulty estimates), and a maintainability index similar to Visual Studio's implementation. You run it from the command line or call it programmatically to analyze Python files and get a report on code structure and complexity.
The tool is designed to integrate into CI/CD pipelines and code review platforms (Codacy, Code Climate, coala, CodeFactor all support it). It depends only on mando for CLI handling and colorama for optional colored output. It can also analyze Jupyter notebooks if the optional nbformat package is installed.
Use it for
- Identify overly complex functions that need refactoring by running cyclomatic complexity analysis on a codebase
- Measure code maintainability trends over time by tracking raw metrics and maintainability index across releases
- Integrate code quality gates into CI/CD by using radon to fail builds when complexity thresholds are exceeded
- Analyze Jupyter notebooks for code quality metrics alongside regular Python files
- Generate code quality reports for code review or documentation purposes
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Radon is stable and widely used (5.7M monthly downloads, top 5000 packages), with no known vulnerabilities and low install friction. However, the project is dormant—no releases in over a year and no commits since October 2024. Install it if you need code metrics for analysis or CI integration, but do not expect active maintenance or support for very recent Python versions. For active monitoring and CI enforcement, consider xenon as an alternative.
Install
radon on PyPI
Before you install
Low install friction with only two runtime dependencies (mando and colorama). Dormant maintenance status—last release was over a year ago and no commits since October 2024—but the package is marked Production/Stable and has accumulated 2005 repository stars.
On Windows or systems with non-UTF-8 default encoding, set the RADONFILESENCODING environment variable to UTF-8 to analyze files with Unicode characters.
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions.
Quickstart
pip install radon
radon cc mymodule.py -a
# Or programmatically:
from radon.complexity import cc_visit
with open('mymodule.py') as f:
results = cc_visit(f.read())
Verify before relying
- Whether the package remains actively maintained or is effectively unmaintained despite Production/Stable status
- Compatibility with Python versions beyond 3.8 (classifiers list up to 3.9 but description mentions 3.8 as the upper bound)
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesmandocolorama |
| Maintenance | Dormant 1,237 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,780,891 / month, #2,038 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality AssuranceTopic :: Utilities |
Evidence: radon-6.0.1-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 › “cyclomatic complexity analysis”
- radonRadon computes code metrics from Python source files, including…
- lizardLizard analyzes code complexity and detects code clones across many…
- 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 xenon · lizard · mccabe · cognitive-complexity · complexipy · pygount · django-prometheus · flake8-cognitive-complexity · gdtoolkit · aws-cdk.aws-cloudwatch