skillfed

abi3info

A library for abi3 and other CPython API information

abi3info v2025.11.29 439.6K downloads/30d#6,653 on PyPI9
Permissive license MIT Active released

What it is and what it does

abi3info is a reference library that makes CPython's stable ABI (abi3) metadata programmatically accessible. It parses and exposes information about the limited API—the subset of CPython's C API that remains stable across minor versions—as a set of top-level dictionaries mapping symbol names to structured data models. Each dictionary (FUNCTIONS, MACROS, STRUCTS, TYPEDEFS, DATAS, FEATURE_MACROS) holds metadata about the corresponding API element, including when it was added, any preprocessor guards, and whether it's ABI-only.

This is useful for developers working with CPython's C extension interface, particularly those building or analyzing tools that depend on the stable ABI. Rather than parsing CPython's source files directly, you can query abi3info to check whether a symbol exists, what Python version introduced it, and what conditions govern its availability. The library is actively maintained and draws its data from CPython's own stable_abi.toml metadata file.

Use it for:

  • Check which stable ABI symbols are available in a target Python version before writing C extension code.
  • Validate that a C extension only uses symbols from the stable ABI to ensure forward compatibility.
  • Generate documentation or reports about the stable ABI surface and its evolution across CPython releases.
  • Analyze feature macros to understand which optional API features are available in a given build.
  • Inspect symbol metadata (added version, ifdef guards) to determine compatibility constraints for extension projects.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

abi3info exposes CPython's limited API and stable ABI (abi3) metadata as queryable Python dictionaries, letting you look up information about functions, macros, structs, typedefs, and data symbols available in the stable ABI.

Yes, if you work with CPython's C API or stable ABI. It eliminates the need to manually parse CPython sources or maintain your own ABI metadata. No runtime dependencies, low friction, permissive license, and actively maintained. Not relevant for pure-Python projects.

Install

abi3info on PyPI

pip

pip install abi3info

uv

uv add abi3info

poetry

poetry add abi3info

Installing abi3info

Before you install

Low friction: pure Python wheel with no runtime dependencies. Actively maintained as of 2026-06-10, with production-stable status and consistent release cadence since 2022-09-19.

License in practice

MIT license (permissive) with metadata derived from CPython sources under the PSF license. You can use this library freely in commercial or proprietary projects.

Quickstart

pip install abi3info

from abi3info import FUNCTIONS
from abi3info.models import Symbol

func = FUNCTIONS[Symbol("_Py_NegativeRefcount")]
print(func.symbol, func.added, func.ifdef, func.abi_only)

Requires Python 3.10 or later.

Verify before relying

  • Whether the stable_abi.toml metadata is updated with each CPython release or on a different schedule.
  • Performance characteristics when iterating over large numbers of symbols or querying frequently.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 258 days since the last release
Last repo commit
First released
Downloads 439,597/month — #6,653 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: abi3info-2025.11.29-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Security

Tags

cpython stable abi informationabi3 api metadata lookuplimited api introspectioncpython stable api referenceabi3 function symbol details
cpython-apistable-abic-extension

More Security packages