Code Monkey home page Code Monkey logo

abi3info's Introduction

abi3info

CI PyPI version

abi3info exposes information about CPython's "limited API" (including the stable ABI, called abi3) as a Python library.

Installation

abi3info is available via pip:

$ pip install abi3info

Usage

abi3info exposes limited API and stable ABI information in the form of a set of top-level dictionaries, namely:

import abi3info

abi3info.FEATURE_MACROS
abi3info.MACROS
abi3info.STRUCTS
abi3info.TYPEDEFS
abi3info.FUNCTIONS
abi3info.DATAS

Each of these is a mapping of a name (either as str or Symbol) to a data model describing the kind of item (e.g. FeatureMacro or Function).

See the generated documentation for more details, including comprehensive type hints and explanations of each data model.

See also the stable_abi.toml file, taken from the CPython sources, which describes each model and their semantics.

Examples

Get information about a particular function:

from abi3info import FUNCTIONS
from abi3info.models import Symbol

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

Get information about the feature macros that control the limited API:

from abi3info import FEATURE_MACROS

print(fm for fm in FEATURE_MACROS.values())

Licensing

abi3info is licensed under the MIT license.

abi3info is partially generated from metadata retrieved from the CPython sources, which is licensed under the PSF license.

abi3info's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar nicholasjng avatar ret2libc avatar woodruffw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

abi3info's Issues

Switch to date-based releases

This library involves a periodically updated data source, so we should use date versioning.

This switch should occur once I'm confident about the API.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.