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, dstWrap)
      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.1.1.tar.gz (11.5 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.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pycxx11bindings-1.1.1.tar.gz
Algorithm Hash digest
SHA256 67f55927162b9f7a3ad66815316f64263d783cf0686490f55d9e3fccde473251
MD5 66fe6ae55f6825b2560a7f8d66adb976
BLAKE2b-256 26121e50b83af5c7f8666326ef186d5838dc9e6af237e6b39ba60fefa467d084

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pycxx11bindings-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bea6e421d7ed51371a349848e53e162c4d61f7f85cee1e399328eec812741277
MD5 c16d935a77e185907c4076a98bf63a84
BLAKE2b-256 c3a0c6259d934f3d68be6937345011129f772f2c2def97805c7715357af69b63

See more details on using hashes here.

Provenance

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