Skip to main content

ctyped

https://github.com/idlesign/ctyped

release lic ci coverage

Description

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('mylib.so')

@lib.structure
class Box:

    one: int
    two: str

# 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, box: Box) -> str:
        ...

# Bind ctype types to functions available in the library.
lib.bind_types()

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

Read the documentation for more information.

Documentation

http://ctyped.readthedocs.org/

Metadata

Release files for ctyped 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ctyped 0.8.0
File Size Uploaded
ctyped-0.8.0.tar.gz 26.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ctyped 0.8.0
File Interpreter ABI Platform
ctyped-0.8.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 38.6 kB

Release files / ctyped-0.8.0.tar.gz

Download URL ctyped-0.8.0.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e1c179d27a0d9fe8649485b34c67e00eb30e2c4fa149bd2a6cc5de489def4b7b
BLAKE2b-256 checksum
How to use checksums
f2ff1706e5e67e666730d216aaa3942892381e16c9dcb25a572c1c75c33b2be8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Release files / ctyped-0.8.0-py2.py3-none-any.whl

Download URL ctyped-0.8.0-py2.py3-none-any.whl
Size 12.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0297a526c53948df4d6a0411f2054df545c1f4a0d92172d1921e48ef5ea5b34f
BLAKE2b-256 checksum
How to use checksums
f6af7f660b8831e9456d3a6d536518153d7d61841176c9dd8d34ba244a73338e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page