Build ctypes interfaces for shared libraries with type hinting
Project description
https://github.com/idlesign/ctyped
Work in progress. Stay tuned.
Description
Build ctypes interfaces for shared libraries with type hinting
Requires Python 3.6+
Less boilerplate;
Logical structuring;
Useful helpers.
from ctyped.toolbox import Library
# Define library.
lib = Library('mylib.so')
# 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) -> str:
...
# Bind ctype types to functions available in the library.
lib.bind_types()
# Call function from the library.
result_string = some_func('Hello!', 2019)
Read the documentation for more information.
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ctyped-0.3.0.tar.gz
(20.1 kB
view hashes)
Built Distribution
ctyped-0.3.0-py2.py3-none-any.whl
(16.2 kB
view hashes)
Close
Hashes for ctyped-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 836a3844f01859109d2d66d9c78f79a857585b516db967d6816964a18941db17 |
|
MD5 | bb38fbebbc1b3ac4adb627c016db69be |
|
BLAKE2b-256 | a0d6e7f1426ab21de964953ed1901c7249f2dce0162224979055ffa5878d7b90 |