Skip to main content

Build ctypes interfaces for shared libraries with type hinting

Project description

release lic ci coverage


Build ctypes interfaces for shared libraries with type hinting

Requires Python 3.6+

  • Less boilerplate;

  • Logical structuring;

  • Basic code generator (.so function -> ctyped function);

  • Useful helpers.

from ctyped.toolbox import Library

# Define library.
lib = Library('')

class Box:

    one: int
    two: str

# Type less with function names prefixes.
with lib.scope(prefix='mylib_'):

    # Describe function available in the library.
    def some_func(title: str, year: int, box: Box) -> str:

# Bind ctype types to functions available in the library.

# Call library function.
result_string = some_func('Hello!', 2019, Box(one=35, two='dummy'))

Read the documentation for more information.


Project details

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.8.0.tar.gz (26.1 kB view hashes)

Uploaded source

Built Distribution

ctyped-0.8.0-py2.py3-none-any.whl (12.5 kB view hashes)

Uploaded 2 7

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page