{"categories":[{"label":"Build Tools","url":"https://skillfed.io/packages/category/software-development-build-tools/2"}],"enrichment":{"capability":"Generates PEP 561 type stubs for Python binary extensions, making them visible to static analysis tools and IDEs by introspecting compiled modules.","skillfed_tags":["type-stubs","static-analysis","pybind11"],"use_cases":["Generate stubs for NumPy or other scientific C extensions so type checkers can validate code using them.","Enable IDE autocomplete and inline documentation for third-party binary modules without source access.","Create type stubs for in-house pybind11 modules to integrate them into a typed Python codebase.","Support static analysis in CI/CD pipelines that use mypy or similar tools on code importing compiled extensions.","Publish type information alongside a compiled extension package to improve downstream user experience."],"what_it_does":"pybind11-stubgen is a command-line tool that introspects compiled Python extensions and generates PEP 561 type stub files (.pyi) for them. Binary extensions\u2014whether built with pybind11, ctypes, or other C/C++ binding libraries\u2014are normally opaque to static type checkers and IDEs because their signatures and types exist only at runtime in compiled code. This tool bridges that gap by extracting type information from the running module and writing it out as stub files that tools like mypy, pyright, and IDEs can read.\n\nThe tool is designed primarily for pybind11 modules but works with other binding approaches. It offers command-line options to handle edge cases like invalid expressions, unresolved names, and special handling for NumPy arrays. Once stubs are generated, they sit alongside your extension modules and enable full IDE autocomplete, type checking, and documentation generation for code that uses those extensions.","worth_installing":"Yes, if you work with Python binary extensions and want static type checking or IDE support for them. It has no runtime dependencies, low friction, and solves a real problem\u2014making opaque compiled code visible to the Python tooling ecosystem. Install it as a development or build-time tool."},"id":"pybind11-stubgen","links":{"html":"https://skillfed.io/packages/pybind11-stubgen","md":"https://skillfed.io/packages/pybind11-stubgen.md","pypi":"https://pypi.org/project/pybind11-stubgen/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-08-09","license_spdx":null,"license_treatment":"permissive","name":"pybind11-stubgen","python_support":"supports_current","summary":"PEP 561 type stubs generator for pybind11 modules"},"popularity":{"monthly_downloads":1336440,"position":4032,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2.5.5"}
