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.1.0.tar.gz
(17.9 kB
view hashes)
Built Distribution
ctyped-0.1.0-py2.py3-none-any.whl
(14.1 kB
view hashes)
Close
Hashes for ctyped-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | baf2208456aa692032bb023e59807036667afe21fb8b27495a1de6b6b122df6a |
|
MD5 | 7c787c940f4626b928325956e7f343a1 |
|
BLAKE2b-256 | 97a4fd13c980d2406cf15134aef82efdea59ceb8545154dd98446e2917f1ad56 |