npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cc-python

v1.0.0

Published

How does Claude Code use Python? python3 call analysis — 3,790 calls, 55.9% inline one-liners, py_compile as quality gate.

Downloads

99

Readme

cc-python

How does Claude Code use Python? 3,790 python3 calls. 55.9% are inline one-liners (-c flag). python -m py_compile runs 703 times — syntax checking as a quality gate. pip called only 5 times.

python3 call analysis across all your sessions.

npx cc-python

No install. No dependencies.


What it shows

  • Total python calls — across all sessions
  • How Python is used — inline (-c), module (-m), script (.py) breakdown
  • Top -m modules — py_compile, pytest, and others
  • Most imported modules — what Claude imports in inline code
  • Most run scripts — which .py files get executed most

Output

  cc-python — Python Call Analysis
  ════════════════════════════════════════

  ▸ Overview
    Total python calls:   3,790
    Sessions with Python: 288
    Inline (-c/heredoc):  2,120 (55.9%)
    Module (-m):          1,224 (32.3%)
    Script (.py):         345 (9.1%)
    pip install:          5

  ▸ How Python is used
    Inline (-c/heredoc)  ████████████████  55.9%  (2,120)
    Module (-m)          █████████░░░░░░░  32.3%  (1,224)
    Script (.py)         ███░░░░░░░░░░░░░   9.1%  (345)

  ▸ Top -m modules
    py_compile           ████████████████  18.5%  (703)
    pytest               ███████████░░░░░  12.5%  (472)

  ▸ Most imported modules (inline)
    import json          ████████████████  (468)
    import yaml          █████████████░░░  (392)
    import re            ████████░░░░░░░░  (220)

  ▸ Insights
    55.9% inline — Claude uses Python as a shell scripting language.
    python -m py_compile: 703 calls (18.5%) — syntax checking as a quality gate.
    python -m pytest: 472 calls — automated test runs.

Options

npx cc-python          # terminal output
npx cc-python --json   # JSON output for scripting

JSON output

{
  "version": "1.0.0",
  "totalPythonCalls": 3790,
  "sessionsWithPython": 288,
  "inline": 2120,
  "module": 1224,
  "script": 345,
  "pip": 5,
  "inlinePct": 55.9,
  "topModules": [
    { "mod": "py_compile", "count": 703 },
    { "mod": "pytest", "count": 472 }
  ],
  "topImports": [
    { "module": "json", "count": 468 },
    { "module": "yaml", "count": 392 }
  ]
}

Browser version

Try it without installing: yurukusa.github.io/cc-python

Drag-drop your ~/.claude/projects/ folder (or any subfolder) to analyze.

How it works

Reads ~/.claude/projects/**/*.jsonl session transcripts and extracts every Bash tool call that starts with python or python3. Classifies each call into inline (-c flag or heredoc), module (-m), or script (.py file). Extracts import statements from inline code and script filenames from script calls. Zero external dependencies.


Part of cc-toolkit — 76 tools for understanding your Claude Code sessions.