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.0.tar.gz (12.1 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.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pycxx11bindings-1.2.0.tar.gz
  • Upload date:
  • Size: 12.1 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.0.tar.gz
Algorithm Hash digest
SHA256 ab93779889dfb2b99044a5aa710393acecee36899db9df81c6996cc1b064ddd8
MD5 19113710c6a0301777f822d6ce08827f
BLAKE2b-256 adba93a698e2ecf009d52d9fa38151f06aa1616d67e508e117d83fd25a531f3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxx11bindings-1.2.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pycxx11bindings-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 198ca397bb88c1654a9eb990f0f2aa8a8180e06450d8d2e8c9ef0fbb26f42503
MD5 d400b78acbed475b70963363f1d9c6dc
BLAKE2b-256 862b144612b360e2e306b01613739c02f8920f1fd111f50e29da0a91ac935577

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycxx11bindings-1.2.0-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