Skip to main content

py-code-org

Find which PyPI packages use a module, function or class, from the command line or from an AI coding tool. It reads the index behind py-code.org, which covers the latest release of more than 335,000 PyPI projects (every project released in the last year, plus the most downloaded ones) and records every name their code imports or reaches by attribute.

Use it before you rename or remove something in a library, to see who calls it and where.

$ uvx py-code-org who-uses httpx.AsyncClient --limit 3
26,709 packages use httpx.AsyncClient (index built 2026-11-13)

#  Package                  Version  Downloads/mo  Files  First use
1  google-genai             3.2.0          124.9M      8  google/genai/_api_client.py:735
2  google-cloud-aiplatform  2.9.0           70.8M      3  agentplatform/_genai/_runtimes_utils.py:1810
3  sentry-sdk               2.75.0          66.7M      1  sentry_sdk/integrations/httpx.py:28

Showing 3 of 26,709. --limit 0 shows the 2,000 most downloaded.

Narrower names: httpx.AsyncClient.send (179), httpx.AsyncClient.__init__ (57), ...

It has no dependencies and needs Python 3.9 or newer.

Install

pipx install py-code-org     # or: uv tool install py-code-org

Or run it without installing: uvx py-code-org who-uses requests.Session.

Commands

Command What it shows
py-code who-uses NAME Packages that import or call NAME, most downloaded first, with the file and line of the first uses
py-code project NAME What a PyPI project imports, the modules it provides, and how many packages import it
py-code names MODULE Every indexed name under a top-level module and how many packages use each
py-code mcp Run as an MCP server over stdio

Options:

  • who-uses --min-downloads N: only packages with at least N downloads in the last 30 days.
  • who-uses --limit N, names --limit N: rows to show; 0 shows all.
  • names --prefix numpy.linalg: only names that start with the prefix.
  • --json on every lookup command prints JSON for scripts.

Names are case-sensitive and written as the code imports them: requests.Session, numpy.linalg.norm, PIL.Image. When a name is not found, the tool suggests the closest indexed spelling. The exit code is 0 when found, 1 when not found and 2 when the index could not be reached.

Use it from an AI coding tool (MCP)

The mcp command gives AI coding tools three read-only tools:

  • who_uses(name, min_downloads, limit)
  • project_imports(project)
  • module_names(module, prefix, limit)

Claude Code:

claude mcp add py-code -- uvx py-code-org mcp

Cursor, Claude Desktop and other tools that read an mcpServers JSON file:

{
  "mcpServers": {
    "py-code": { "command": "uvx", "args": ["py-code-org", "mcp"] }
  }
}

Then ask, for example: "Which popular packages call requests.Session.merge_environment_settings?"

Where the data comes from

Every lookup is two small requests to the static JSON files at https://data.py-code.org/api: a manifest, then the shard that holds the name. Nothing is sent except the name you look up. The index is rebuilt monthly. Set PY_CODE_API to read a copy hosted elsewhere.

What it misses: older releases, dynamic imports (importlib.import_module, getattr), names passed through variables, and files that do not parse as current Python. For bulk queries, the full tables are on Hugging Face as Parquet: pypi-data/py-code.

The scanner that builds the index is in the same repository: pypi-data/py-code.

Licence

MIT.

Metadata

Release files for py-code-org 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-code-org 0.1.1
File Size Uploaded Provenance Actions
py_code_org-0.1.1.tar.gz 11.5 kB With provenance Details for py_code_org-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py-code-org 0.1.1
File Interpreter ABI Platform Actions
py_code_org-0.1.1-py3-none-any.whl Python 3 none any Details for py_code_org-0.1.1-py3-none-any.whl

Total release size: 24.2 kB

Release files / py_code_org-0.1.1.tar.gz

Download URL py_code_org-0.1.1.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
409cf76da9a18f95cd3b701eb14c9ce4ca44a5bac844fff4054ac2eb2ddd217f
BLAKE2b-256 checksum
How to use checksums
c22f02e91260775565411b7d58eb86565cae4e68044ae08e6009815fdbb3bb8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / py_code_org-0.1.1-py3-none-any.whl

Download URL py_code_org-0.1.1-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79d31272f7009ff0066dd412efcf3fe9e70798bf95f390b0f4d1864e39c18d20
BLAKE2b-256 checksum
How to use checksums
c7f5e4e94c578a4af0cb6564389af883fc18b554bf547fa11299acc2d38800c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for py-code-org 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for py_code_org-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page