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

This version

2.5.5

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.5.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

pybind11_stubgen-2.5.5-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pybind11_stubgen-2.5.5.tar.gz
Algorithm Hash digest
SHA256 758d6d6bbeefc62ad7f78d5e5bbf357ccf6af83cd4504f5f549403f452942708
MD5 3ac96e79048fa8d8026122b94c904c21
BLAKE2b-256 818181900180501a51056572dd01aa852cc2d162478d4676ecebbfaad5cc20d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pybind11_stubgen-2.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 10824cd2fc5cbbee032b8fb39e6f6c08de232deb309bc66d786a6c6e8a4601bd
MD5 ed218da00af4f0bde0053e8bde27e9c7
BLAKE2b-256 4fe44f2d41881fae547f06ffa4c9748fa8ed13c4db5c830ff268b84175546b3c

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