Skip to main content

Instant code quality reports for your Python projects — style, complexity, and an overall health score in one command

Project description

CodeMRI

Instant code quality reports for your Python projects.

CodeMRI scans your codebase and gives you a single, easy-to-read health score — combining style violations and code complexity into one number, so you know exactly how healthy your code is and where to focus first.

Why CodeMRI?

Most linters dump a wall of warnings and leave you to figure out what matters. CodeMRI instead gives you:

  • One overall health score (0–100) with a letter grade — like an MRI scan for your code
  • A "Worst Offenders" leaderboard — the exact functions and files causing the most pain, ranked by severity
  • A clean, shareable HTML report — perfect for pasting into a PR or sharing with your team
  • Score history tracking — see whether your codebase is improving or rotting over time, right from the CLI

Installation

pip install codemri

Usage

Scan the current directory:

codemri scan .

Scan a specific file or folder:

codemri scan path/to/project

Generate a shareable HTML report:

codemri scan . --html

View your score history over time:

codemri history .

Check the installed version:

codemri --version

Example output

────────────────── Overall Code Health ──────────────────╮ │ 69/100 Grade: C │ ╰────────────────────────────────────────────────────────╯ Style score: 39/100 (9 issues across 59 lines) Complexity score: 98/100 (1 files analyzed)

How scoring works

  • Style score — based on the density of style/lint issues (via ruff) relative to lines of code
  • Complexity score — based on cyclomatic complexity rankings (via radon) across all functions
  • Overall score — a 50/50 weighted average of the two, mapped to a letter grade (A–F)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codemri-0.1.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codemri-0.1.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file codemri-0.1.1.tar.gz.

File metadata

  • Download URL: codemri-0.1.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for codemri-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a2e1b829fe8b17509c2373ff703db4ff15d11a86d7abe118ff8c57fdb31ce294
MD5 32df6a0046f7df747acda7b3afe6b247
BLAKE2b-256 86698b664d6721fa223c84a41eb84767651c516602b7c0eb03fad408ff396543

See more details on using hashes here.

File details

Details for the file codemri-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: codemri-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for codemri-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0df6c91d3c07cd6f5a56363c785fcd75713d80df672bbc1dc2a80b1480c6edd0
MD5 59924baa71b343aa94d7d782acf7339e
BLAKE2b-256 816f180520b118b40d2bd3f5013e3c706650081ddd9eca86268a3f982046a25c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page