Comparison
cognitive-complexity vs complexipy vs xenon
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
Library to calculate Python functions cognitive complexity via code
Likely abandoned. No release or commit for years (last release over 4 years ago).
$
pip install cognitive-complexityAn extremely fast Python library to calculate the cognitive complexity of Python files, written in Rust.
Actively maintained. Last release 3 weeks ago, commits in 23 of the last 26 weeks. A safe choice.
$
pip install complexipyMonitor code metrics for Python on your CI server
Slowing down. Last release over 2 years ago, little activity since. Fine for existing code; think twice for a new project.
$
pip install xenonIn short
- cognitive-complexity looks abandoned: avoid it for new projects.
- xenon is slowing down (last release over 2 years ago): fine for existing code, risky for a new project.
- complexipy is the most used: 2.1M downloads a month.
- complexipy also has the best Pythie’s Index (84).
- complexipy is growing fastest: downloads +37% over the last month.
- Safe default for a new project: complexipy.
Side by side
| Metric | cognitive-complexity | complexipy | xenon |
|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 20 | 84 |