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.5.0.tar.gz
(21.5 kB
view hashes)
Built Distribution
Close
Hashes for ctyped-0.5.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1891e89b8dc332051f4668eb000b04723b527ed791783169c4d96fad3fb8319d |
|
MD5 | 0782a37924714d880509f7be7a9a4fb2 |
|
BLAKE2b-256 | 86e8c530d07ccb0e8d7ec60918511c79b073cbfb4d4804e4f3296b267871736a |