Metadata-Version: 2.4
Name: pyclibrary
Version: 0.3.0
Summary: C binding automation
Author-email: "Matthieu C. Dartiailh" <m.dartiailh@gmail.com>
License: The MIT License (MIT)
        
        Copyright (c) 2010 Luke Campagnola
        Copyright (c) 2015 Matthieu Dartiailh
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
        
Project-URL: homepage, https://github.com/MatthieuDartiailh/pyclibrary
Project-URL: documentation, https://pyclibrary.readthedocs.io/en/latest/
Project-URL: repository, https://github.com/MatthieuDartiailh/pyclibrary
Project-URL: changelog, https://github.com/MatthieuDartiailh/pyclibrary/blob/main/CHANGES
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
License-File: AUTHORS
Requires-Dist: pyparsing<4,>=2.3.1
Dynamic: license-file

PyClibrary
==========

.. image:: https://github.com/MatthieuDartiailh/pyclibrary/workflows/Continuous%20Integration/badge.svg
    :target: https://github.com/MatthieuDartiailh/pyclibrary/actions
.. image:: https://github.com/MatthieuDartiailh/pyclibrary/workflows/Documentation%20building/badge.svg
    :target: https://github.com/MatthieuDartiailh/pyclibrary/actions
.. image:: https://codecov.io/gh/MatthieuDartiailh/pyclibrary/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/MatthieuDartiailh/pyclibrary
.. image:: https://readthedocs.org/projects/pyclibrary/badge/?version=latest
    :target: https://pyclibrary.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status
.. image:: https://badge.fury.io/py/pyclibrary.svg
    :target: https://badge.fury.io/py/pyclibrary
    :alt: Latest Version
.. image:: https://img.shields.io/pypi/pyversions/pyclibrary.svg
    :target: https://badge.fury.io/py/pyclibrary
    :alt: Supported Python versions
.. image:: https://img.shields.io/pypi/wheel/pyclibrary.svg
    :target: https://badge.fury.io/py/pyclibrary
    :alt: Wheel Status
.. image:: https://img.shields.io/pypi/l/pyclibrary.svg
    :target: https://badge.fury.io/py/pyclibrary
    :alt: 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.
