apiverify
Status: 0.1.2 fixes the wrong answers that independent evaluations found in 0.1.0 and 0.1.1. A final independent retest of the supported syntax boundary passed on 69 synthetic cases (42 decisive and correct, 27 abstained, 0 wrong). That is not proof of broad reliability: on real libraries it abstained on about 49% of probes, and one class-vs-instance attribute ambiguity remains. Not compared with other tools; no evidence yet that it helps agents. 0.1.0 could return
not_foundfor names that exist at runtime (members inherited fromobject, members generated by class decorators, members attached after the class body, names made viaglobals()/exec) andverifiedfor conditional names (TYPE_CHECKING-only,del-ed, version-gated). 0.1.2 now answerscannot_verifyfor those, limits unpacking (only.py/.pyi, 100 MB total, 8 MB per file) and validates inputs. Expect manycannot_verifyanswers (the evaluation saw 46% abstention on lazily loaded or re-exporting libraries such as pydantic 2). Monkeypatching from a different module cannot be seen. Do not treat this as proven reliable.
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 in the source. Returns file, line, signature, and deprecation signals. Kindinstance attributemeans it is assigned onselfin a method, not necessarily on the class itself.not_found: every lookup path was followed and the name is absent from the release's source, within the supported syntax boundary below. This is a source-only result, not a runtime guarantee.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. This is the author's own run on the cases the tool was built against, so it does not
show reliability (see the warning above). Result 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.
Supported syntax boundary (a static checker, not a Python interpreter)
verified / not_found are only returned for plain module-level code: def, class, simple assignments,
import / from ... import (including relative and star imports inside the same artifact), plain-name
base classes, Class.attr = value at module level, and literal __slots__. Anything else that could add,
remove or hide a name gives cannot_verify: conditional definitions (version/platform/feature checks, unless
both branches define it), TYPE_CHECKING-only names, del, class or alias rebinding, class decorators,
metaclasses, __getattr__, globals()/exec/eval/setattr, loops that assign attributes, and external
base classes or re-exports. It cannot see another module patching the class at import time.
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 attributeresults. - 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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| apiverify-0.1.2.tar.gz | 21.2 kB | Without provenance | Details for apiverify-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| apiverify-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for apiverify-0.1.2-py3-none-any.whl |
Total release size: 38.6 kB
Release files / apiverify-0.1.2.tar.gz
| Download URL | apiverify-0.1.2.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af77cc36b775cbb79ab53f260c989267698d711cfca272ff7d007309954a24c1
|
|
BLAKE2b-256 checksum How to use checksums |
d95534a3ecebb6369a26c21fe7a6ea96b668fde4665dd5efd1e4c02969e4b255
|
| 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.2-py3-none-any.whl
| Download URL | apiverify-0.1.2-py3-none-any.whl |
|---|---|
| Size | 17.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dcd53fb70372009541518d79d9e7720eaddf93bfc8cd2534a6453997f8e83b61
|
|
BLAKE2b-256 checksum How to use checksums |
cd96abea9f1b6c23b6723bc9b8ce8ca544190445278920dbd3e16b1cfe319ec2
|
| 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.2
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.