Skip to main content

C binding automation

Project description

https://github.com/MatthieuDartiailh/pyclibrary/workflows/Continuous%20Integration/badge.svg https://github.com/MatthieuDartiailh/pyclibrary/workflows/Documentation%20building/badge.svg https://codecov.io/gh/MatthieuDartiailh/pyclibrary/branch/master/graph/badge.svg Documentation Status Latest Version Supported Python versions Wheel Status License

C parser and bindings automation for Python.

Fork of https://launchpad.net/pyclibrary.

PyCLibrary includes 1) a pure-python C parser and 2) an automation library that uses C header file definitions to simplify the use of c bindings. The C parser currently processes all macros, typedefs, structs, unions, enums, function prototypes, and global variable declarations, and can evaluate typedefs down to their fundamental C types + pointers/arrays/function signatures. Pyclibrary can automatically build c structs/unions and perform type conversions when calling functions via cdll/windll.

PyCLibrary tries to present a ffi agnostic API to allow using different bindings. For the time being only the ctypes based backend is implemented but a cffi backend should be possible to implement (the rational for it would be that the CParser can be used on raw header files which are not always well supported by the cffi parser).

However if you need to manipulate the C object coming back from the library which cannot simply be mapped to Python object your code will most likely not be backend independent so it is discouraged to try to switch between backends.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyclibrary-0.3.0.tar.gz (583.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyclibrary-0.3.0-py3-none-any.whl (562.5 kB view details)

Uploaded Python 3

File details

Details for the file pyclibrary-0.3.0.tar.gz.

File metadata

  • Download URL: pyclibrary-0.3.0.tar.gz
  • Upload date:
  • Size: 583.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyclibrary-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8a3eaa9ab728c11b077644275af4e05ca24ddcad491f47eb45b75db6be52c654
MD5 ad1114eb42a7cc65cafe1d2133e27537
BLAKE2b-256 9c3e791a63041d3d237c591b5bf4a50d46d0de7e62a16a0ab8173d2d7e8c79a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyclibrary-0.3.0.tar.gz:

Publisher: release.yml on MatthieuDartiailh/pyclibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyclibrary-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pyclibrary-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 562.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyclibrary-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b704145eee612d88f0623b4d6a68ea65af77b34aa2d92ed75c61ef3592edc3a1
MD5 99bd8cf034209cbbac64b25b1fa7a0ff
BLAKE2b-256 562f5b214a00afd5407d7e174a35e8244174f6f4445a0a9f0a55cafd209af963

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyclibrary-0.3.0-py3-none-any.whl:

Publisher: release.yml on MatthieuDartiailh/pyclibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page