Python API dumping and comparison tool
Dumps the public API of a Python module and its members to a file, which can then be used to show differences in the public API between two dumps, e.g. of different versions of the same module.
Command-line interface
$ py-api-dumper --help
-
To dump the public API of a module
mymod:$ py-api-dumper dump -o mymod1.dump mymodmymod1.dumpwill record the public API ofmymodin a reloadable format. -
To print the API of
mymodin text format:$ py-api-dumper dump mymod MODULE : mymod CLASS : myclass FUNCTION : __init__ : no-return-type REQUIRED : 0 : x : int ...The text format is a tree of entries of each nested class, class method, function, member variable, etc. in the public API.
-
To compare the API of
mymodbetween different versions:$ py-api-dumper diff mymod-old.dump mymod-new.dump --- mymod-old.dump mymod=1.0 +++ mymod-new.dump mymod=2.0 +MODULE : mymod + CLASS : myclass + FUNCTION : __init__ : no-return-type + REQUIRED : 1 : b : no-typeThe above output shows the expected output if, between
mymodversions 1.0 and 2.0, an additional positional argumentbhad been added to the__init__method of the classmymod.myclass.$ py-api-dumper diff -o mymod.diff ...This will write out the API differences to
mymod.diffin JSON format:- the paths to the dumps of the old and new APIs, e.g.
mymod-old.dumpvs.mymod-new.dump; - the version of
mymodat the old and new API dumps, e.g. mymod1.0vs.2.0; - API entries which have been removed, i.e. present in the old API but not in the new API (e.g. none in the above example);
- API entries which have been added, i.e. present in the new API but not in
the old API (e.g. the
bargument in the above example).
- the paths to the dumps of the old and new APIs, e.g.
-
To filter out undesired entries from API dumps before comparison:
$ py-api-dumper diff mymod-old.dump mymod-new.dump -i <filter>Given the following API:
MODULE : mymod CLASS : myclass FUNCTION : __init__ : no-return-type REQUIRED : 0 : x : intthe following filters would ignore the given entries:
<filter>Ignore entries MODULEAll modules MODULE:mymodAll modules named mymodCLASSAll classes CLASS:myclassAll classes named myclassMODULE:mymod;CLASSAll classes in modules named mymodMODULE:mymod;CLASS:myclassClass myclassin modulemymodFUNCTION:__init__All functions named __init__CLASS;FUNCTION:__init__All functioned named __init__in classes
Python interface
from py_api_dumper import APIDump, APIDiff
-
To dump the public API of a module
mymod:import mymod dump = APIDump.from_modules(mymod) # OR: APIDump.from_modules("mymod") dump.save_to_file("mymod.dump")
-
To print the API of
mymodin text format:dump.print_as_text()
-
To compare the API of
mymodbetween different versions:diff = APIDiff.from_files("mymod-old.dump", "mymod-new.dump") diff.print_as_text() diff.save_as_json("mymod.diff")
-
To filter out undesired entries from API dumps before comparison:
filter = APIFilter(("CLASS", "myclass")) # OR: APIFilter.from_str("CLASS:myclass") diff = APIDiff.from_files("mymod-old.dump", "mymod-new.dump", filter)
Metadata
Release files for py-api-dumper 4.2.3
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 |
|---|---|---|---|---|
| py_api_dumper-4.2.3.tar.gz | 21.0 kB | With provenance | Details for py_api_dumper-4.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_api_dumper-4.2.3-py3-none-any.whl | Python 3 | none | any | Details for py_api_dumper-4.2.3-py3-none-any.whl |
Total release size: 34.2 kB
Release files / py_api_dumper-4.2.3.tar.gz
| Download URL | py_api_dumper-4.2.3.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
272650422f6a1c9a772e1f24018c92840a322c68bb83d21c642b455df0cae588
|
|
BLAKE2b-256 checksum How to use checksums |
ca65f2c1d58d6c561b8ff6d9f63c0f10b56bc0fc7bef2248314da43004462f8a
|
| 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 7, 2026.
Transparency logRelease files / py_api_dumper-4.2.3-py3-none-any.whl
| Download URL | py_api_dumper-4.2.3-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c524980fc883bf6f87954293048be4927c99049d51a49043e055a16fb28fe6b
|
|
BLAKE2b-256 checksum How to use checksums |
4fbf6e74fb55cd41aa0b18acfbc00aea0149989b818c97b07b9e8442f43c0916
|
| 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 7, 2026.
Transparency logSecurity for py-api-dumper 4.2.3
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.
Attestation for py_api_dumper-4.2.3.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 7, 2026.
Transparency logA 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.