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.6.0.tar.gz
(22.4 kB
view hashes)
Built Distribution
ctyped-0.6.0-py2.py3-none-any.whl
(10.0 kB
view hashes)
Close
Hashes for ctyped-0.6.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | deab9e8896f23ff581e339197f8a77eb2985d6a463ba6a7c72f222e2683ad3ae |
|
MD5 | a55dac21cb222374b27411e0e77ad910 |
|
BLAKE2b-256 | 104aefb6a651ce6dac7d433b025b827d4f357c63dcd3c6ac5834564648af153d |