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.4.0.tar.gz
(20.6 kB
view hashes)
Built Distribution
Close
Hashes for ctyped-0.4.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a72c83a4e564122c5cc0c4f3cf08cc29180c865bff20c34f445b528b72338174 |
|
MD5 | 929a9607821a1759b73ad9b6856d7c67 |
|
BLAKE2b-256 | 43fc03e2d175562b5160f62cb810ed8a00f2162347d9018661784bde994eeb06 |