Skip to main content

No project description provided

Project description

img img img img img img img img

img img

PyCxx11Bindings

About The Project

ctypes provides a set of marshaling capabilities for C-style APIs, but it does not support C++ Stream/APIs directly.

Installation

This package is available on PyPI. You install it using pip:

pip install PyCxx11Bindings

Usage

In your Python code, you can now write something like:

from ctypes import *
from cxx11bindings import *
_acme_convert = _func(
    "acme_convert", c_bool, [POINTER(C11Stream), POINTER(C11Stream)]
)

def acme_convert(instream, outstream):
  with PyC11Stream(instream) as srcWrap:
    with PyC11Stream(outstream) as dstWrap:
      ret = _acme_convert(srcWrap.ptr, dstWrap.ptr)
      if not ret:
        raise ValueError(f"Fail to convert to ACME")

if __name__ == "__main__":
  in_file = open(sys.argv[1], "rb")
  out_file = open(sys.argv[2], "wb")
  acme_convert(in_file, out_file)

Contributing

Any Contributions are greatly appreciated! If you have a question, an issue or would like to contribute, please read our contributing guidelines.

License

Distributed under the MIT License

References

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

pycxx11bindings-1.2.1.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

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

pycxx11bindings-1.2.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pycxx11bindings-1.2.1.tar.gz.

File metadata

  • Download URL: pycxx11bindings-1.2.1.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pycxx11bindings-1.2.1.tar.gz
Algorithm Hash digest
SHA256 d39920deedffb16bf5716caafa5edc192f0eef12af4ef3796dcd242d5bb43402
MD5 713b745c888929aac50b0ef24139e9f9
BLAKE2b-256 17142f480f2f24369b90860ade9329fdd7622a0143edfdfea5605a4b7c5ff6fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxx11bindings-1.2.1.tar.gz:

Publisher: release.yaml on dicomstudio/PyCxx11Bindings

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

File details

Details for the file pycxx11bindings-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pycxx11bindings-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 01a7045b135e3326de6544bd8643183680bea6847d5d2f8a2dd57a72f5d8773d
MD5 95cd37087db8b106a41476d5b6f304e5
BLAKE2b-256 4a7d2e380be09f5277752141bed94fc48eba0cf7cda6bb5c9c7fa16e53128937

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxx11bindings-1.2.1-py3-none-any.whl:

Publisher: release.yaml on dicomstudio/PyCxx11Bindings

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