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-use-type-var|
                  --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.5.4.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

pybind11_stubgen-2.5.4-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file pybind11_stubgen-2.5.4.tar.gz.

File metadata

  • Download URL: pybind11_stubgen-2.5.4.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pybind11_stubgen-2.5.4.tar.gz
Algorithm Hash digest
SHA256 b6bd44a6d4ba55cef80bd8af92f1f8195b1c6bb0f7bd2f6d785c9530ce6bcae9
MD5 f97a23e9525a0f2cdbbb60f9732c9cfd
BLAKE2b-256 57270bfd6cfc97a5c061d36465109f324ac4e7f9c67b90732bb24536c29325ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pybind11_stubgen-2.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8625f25da48cf96eea24ba7cae673b5f49b45847b6ef01eead60c4eb762fe5c5
MD5 8067cc5c2109d07762ec8f88391fa4e2
BLAKE2b-256 ae9d236b014be46c1e75258daa672c9358ec089e6776d75499d2e4050d0fd97e

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