Pybind11 Stubgen Save

Generate stubs for python modules

Project README

pypi

About

Static analysis tools and IDE usually struggle to understand python binary extensions. pybind11-stubgen generates stubs for python extensions to make them less opaque.

While the CLI tool includes tweaks to target modules compiled specifically with pybind11 but it should work well with modules built with other libraries.

# Install
pip install pybind11-stubgen

# Generate stubs for numpy
pybind11-stubgen numpy

Usage

pybind11-stubgen [-h]
                 [-o OUTPUT_DIR]
                 [--root-suffix ROOT_SUFFIX]
                 [--ignore-invalid-expressions REGEX]
                 [--ignore-invalid-identifiers REGEX]
                 [--ignore-unresolved-names REGEX]
                 [--ignore-all-errors]
                 [--enum-class-locations REGEX:LOC]
                 [--numpy-array-wrap-with-annotated|
                  --numpy-array-use-type-var|
                  --numpy-array-remove-parameters]
                 [--print-invalid-expressions-as-is]
                 [--print-safe-value-reprs REGEX]
                 [--exit-code]
                 [--stub-extension EXT]
                 MODULE_NAME
Open Source Agenda is not affiliated with "Pybind11 Stubgen" Project. README Source: sizmailov/pybind11-stubgen
Stars
201
Open Issues
15
Last Commit
1 month ago

Open Source Agenda Badge

Open Source Agenda Rating