{"categories":[{"label":"Build Tools","url":"https://skillfed.io/packages/category/software-development-build-tools/4"},{"label":"Code Generators","url":"https://skillfed.io/packages/category/software-development-code-generators"},{"label":"Pre-processors","url":"https://skillfed.io/packages/category/software-development-pre-processors"}],"enrichment":{"capability":"ctypesgen parses C header files and automatically generates Python ctypes wrapper code, enabling direct calls to C library functions from Python without manual binding work.","skillfed_tags":["ctypes","code-generation","ffi"],"use_cases":["Generate Python bindings for system libraries like APR or Neon to call their C functions directly.","Automate wrapper creation for third-party C libraries to avoid hand-writing ctypes boilerplate.","Create JSON output for generating Lua bindings via Mork using the alien module.","Handle platform-specific library loading and calling conventions automatically.","Translate C preprocessor macros into callable Python functions for library constants and utilities."],"what_it_does":"ctypesgen is a command-line tool that reads C header files and generates Python code using ctypes to call functions in compiled C libraries. It handles preprocessor macros by translating them into equivalent Python functions, and can output either Python wrapper modules or JSON for use with other binding generators like Mork.\n\nThe tool is designed for developers who need to integrate C libraries into Python projects without writing manual ctypes bindings. It supports platform-specific library loading, handles calling conventions, and can manage dependencies between libraries. The generated wrappers use ctypes directly, so they work on any platform with Python 3.7+ and the target C library available.","worth_installing":"Yes, if you need to call C library functions from Python and want to avoid manual ctypes binding work. The low install friction and permissive license make it a practical choice. However, the aging maintenance status (last release October 2022) means you should verify that generated wrappers work correctly for your specific headers and libraries before committing to production use."},"id":"ctypesgen","links":{"html":"https://skillfed.io/packages/ctypesgen","md":"https://skillfed.io/packages/ctypesgen.md","pypi":"https://pypi.org/project/ctypesgen/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2022-10-19","license_spdx":null,"license_treatment":"permissive","name":"ctypesgen","python_support":"supports_current","summary":"Python wrapper generator for ctypes"},"popularity":{"monthly_downloads":168644,"position":10441,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.1.1"}
