Metadata-Version: 2.5
Name: ctyped
Version: 0.8.1
Summary: Build ctypes interfaces for shared libraries with type hinting
Project-URL: Homepage, https://github.com/idlesign/ctyped
Author-email: Igor Starikov <idlesign@yandex.ru>
License-Expression: BSD-3-Clause
License-File: LICENSE
Keywords: cffi,ctypes,shared library
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
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
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# ctyped

<https://github.com/idlesign/ctyped>

[![release](https://img.shields.io/pypi/v/ctyped.svg)](https://pypi.python.org/pypi/ctyped)
[![lic](https://img.shields.io/pypi/l/ctyped.svg)](https://pypi.python.org/pypi/ctyped)
[![coverage](https://img.shields.io/coveralls/idlesign/ctyped/master.svg)](https://coveralls.io/r/idlesign/ctyped)

## Description

*Build ctypes interfaces for shared libraries with type hinting*

**Requires Python 3.10+**

* Less boilerplate;
* Logical structuring;
* Basic code generator (.so function -> ctyped function);
* Useful helpers.

```python
from ctyped.toolbox import Library

# Define library.
lib = Library('mylib.so')

@lib.structure
class Box:

    one: int
    two: str

# Type less with function names prefixes.
with lib.scope(prefix='mylib_'):

    # Describe function available in the library.
    @lib.function
    def some_func(title: str, year: int, box: Box) -> str:
        ...
```

## Documentation

<https://ctyped.readthedocs.io/>
