Skip to main content

PEP 561 type stubs generator for pybind11 modules

Project description

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-remove-parameters]
                 [--print-invalid-expressions-as-is]
                 [--print-safe-value-reprs REGEX]
                 [--exit-code]
                 [--stub-extension EXT]
                 MODULE_NAME

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pybind11-stubgen-2.3.4.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

pybind11_stubgen-2.3.4-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file pybind11-stubgen-2.3.4.tar.gz.

File metadata

  • Download URL: pybind11-stubgen-2.3.4.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pybind11-stubgen-2.3.4.tar.gz
Algorithm Hash digest
SHA256 b620c9640fb15ad91b3885890fdd4f0318203dc5def4022ecc9f3e714e24625a
MD5 127cc14bb298eb60e6824d10ac4c10ad
BLAKE2b-256 bda780cdc15a7970aa92f53cb5924ce41d5093c9760dac14c196136296d2bc2c

See more details on using hashes here.

File details

Details for the file pybind11_stubgen-2.3.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pybind11_stubgen-2.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6d5d2710b6c0ca79cd65dc367b2951226e1ad54c69a5a1a5a01b99588a0d222b
MD5 6d257e8e36b7d1934a884ad1ce1a4903
BLAKE2b-256 82ec066587008abd94b276e51e5d6f9a44bd7a7cc63d36cbcbb81864f99e476f

See more details on using hashes here.

Supported by

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