Skip to main content

apiverify

Does this Python API exist in this exact package version? apiverify answers from the published source of that version, not from docs or model memory.

Three answers only:

  • verified: found. Returns file, line, signature, and deprecation signals.
  • not_found: every lookup path was followed and the name is absent.
  • cannot_verify: the answer depends on something static analysis cannot settle (module-level __getattr__, a base class or re-export from outside the package, a file that will not parse). The agent should not assume either way.

It downloads the release from PyPI, checks the sha256 PyPI lists for it, unpacks it safely, and reads it with ast. It never imports or runs package code. No dependencies.

Use

python -m apiverify.cli requests.Session.get --version 2.31.0
python -m apiverify.cli requests.exceptions.JSONDecodeError -v 2.26.0   # not_found
python -m apiverify.cli requests.exceptions.JSONDecodeError -v 2.27.0   # verified
python -m apiverify.cli PIL.Image.open -v 10.0.0 --package pillow -k mode

Exit code: 0 verified, 1 not_found, 2 cannot_verify.

Install

pip install apiverify        # or: uvx apiverify-mcp   (MCP server)

As an MCP server (stdio)

Tool: verify_python_api with symbol, version, optional package, kwargs.

{ "mcpServers": { "apiverify": { "command": "uvx", "args": ["--from", "apiverify", "apiverify-mcp"] } } }

(From a clone you can also use python -m apiverify.mcp_server.)

Suggested line for an agent's instructions file (AGENTS.md / CLAUDE.md): "Before calling a library API you are not certain exists in the project's pinned version, call verify_python_api. Treat cannot_verify as unknown, not as yes."

Tested scope (see eval/)

Unit tests: python -m unittest discover -s tests (offline fixtures, 14 tests).

Runtime comparison: python eval/run_eval.py installs exact versions of requests (4), click (3) and flask (3), asks Python itself whether each candidate symbol exists, and compares. Candidates are all public names found across the tested versions plus invented decoys. Result of the last run is in eval/last_run.txt: 2,411 correct, 0 false positives, 0 false negatives, 442 abstentions (all flask, mostly names re-exported from werkzeug/jinja2, which live outside the flask artifact), 2 instance attributes not scored.

Limits

  • Python on PyPI only. No JavaScript, Rust or Go yet.
  • Static analysis. Names created at runtime are reported as cannot_verify, not guessed.
  • Not scored in the eval: keyword-argument checks, deprecation signals, and instance attribute results.
  • The eval's candidates mostly come from names that exist in some version, with only a few decoys per library, so it measures version differences well and hallucinated names weakly. It is three libraries, not a benchmark.
  • It has not been compared against Context7 or any retrieval tool. That comparison needs an agent harness and model spend, and is not done.
  • No evidence yet that developers would pay for it or that agents call it unprompted.
  • Needs network access to pypi.org and files.pythonhosted.org. Artifacts are cached in $APIVERIFY_CACHE.

Reaching agents

See DISTRIBUTION.md.

Metadata

Release files for apiverify 0.1.0

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

Source distribution (sdist)

Source distribution for apiverify 0.1.0
File Size Uploaded Provenance Actions
apiverify-0.1.0.tar.gz 14.7 kB Without provenance Details for apiverify-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apiverify 0.1.0
File Interpreter ABI Platform Actions
apiverify-0.1.0-py3-none-any.whl Python 3 none any Details for apiverify-0.1.0-py3-none-any.whl

Total release size: 28.0 kB

Release files / apiverify-0.1.0.tar.gz

Download URL apiverify-0.1.0.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5bdf93b7d423ea708a0bcb202a17b77ddeee10ae5930274200839c2550f6c7d5
BLAKE2b-256 checksum
How to use checksums
d0486ff921e5d129890471ddfc2911e6873a6f807a938cd10c2408f90c5e1f8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release files / apiverify-0.1.0-py3-none-any.whl

Download URL apiverify-0.1.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa49389553933cfb5523683a1b0101a09d13fdb0ba76a6f5e26f5cebca20e0c1
BLAKE2b-256 checksum
How to use checksums
64ed13dbc841ca8aec31776c400681c461083575bd30e3306a5420ea8ac66a3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Security for apiverify 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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