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.functions_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.2.0.tar.gz
(19.6 kB
view hashes)
Built Distribution
ctyped-0.2.0-py2.py3-none-any.whl
(15.8 kB
view hashes)
Close
Hashes for ctyped-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebf022251ad5a21d8b689305fe0061953bca2b1899ce5b7d7454ac5e07aa0468 |
|
MD5 | d6e0f175df350c3ff2dd21f88b3f182e |
|
BLAKE2b-256 | f0aba5c337095eb1531d528fa9a36436cb93820f87c84e979f8c0fca9232d6f2 |