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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pycxx11bindings-1.1.0.tar.gz
  • Upload date:
  • Size: 10.9 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.0.tar.gz
Algorithm Hash digest
SHA256 2a250cd455151dcf2b3b91941058c4d8ea1d8c4b92c744f7fa08556a852dbfed
MD5 39ca72f31feb44857e03a08dc8dd199a
BLAKE2b-256 eb188cae246a15549656aff0369efe67a5ab4c9432238cd540c397545f9acd25

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pycxx11bindings-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a90e73143ed4737ef37d616db8750660d0c4c7a32634f1d8cfcbb354d1cee20
MD5 e55f4aaa56655229bd7b899e34b3f418
BLAKE2b-256 b4e72672e8b47e11cdee4050992ecf25384f8dd4bcaa6ab5701bfe903371c4d9

See more details on using hashes here.

Provenance

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