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

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

Uploaded Source

Built Distribution

pybind11_stubgen-2.5-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pybind11-stubgen-2.5.tar.gz
Algorithm Hash digest
SHA256 96a7febcab248bf98abd4bb72cc5f729ba87b2344247454c1759e63cde9fef34
MD5 b5464973ce773f8fbda4504cb63e8ffa
BLAKE2b-256 e87d8076d8fe78189cae0c173b32e3bdad058be4a88c903a61834ba31399aa0d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pybind11_stubgen-2.5-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for pybind11_stubgen-2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a2c40ab347d9918e6ab807fd7739fa5cbc19bdb1c69b7cc07fedb1a7e93446a9
MD5 e9b25c069b3b95518e8bad4371732085
BLAKE2b-256 2e5e80978e65ceac90b5606925eea03b50760e398a9cb0bbaaeb81abbd2c4c7f

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