Cognitive Complexity
JSON →Cognitive-complexity is a Python library designed to calculate the cognitive complexity of Python functions by analyzing their Abstract Syntax Trees (ASTs). Unlike cyclomatic complexity, cognitive complexity aims to measure how difficult code is for a human to understand, focusing on flow breaks, nesting, and other structures that increase mental effort. The current version is 1.3.0, released in August 2022, with a relatively low release cadence.
Traffic · last 30 days ↓14% vs prev 7d
total hits 21
actors 6 distinct systems
last hit 1d ago AhrefsBot
top countries 🇩🇪 Germany · 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France
Resources
API endpoints
full doc /v1/registry/cognitive-complexity
compatibility /v1/registry/cognitive-complexity/compatibility