[![pypi](https://img.shields.io/pypi/v/pybind11-stubgen.svg?logo=PyPI&logoColor=white)](https://pypi.org/project/pybind11-stubgen/)
About
----
Static analysis tools and IDE usually struggle to understand python binary extensions.
`pybind11-stubgen` generates [stubs](https://peps.python.org/pep-0561/) for python extensions to make them less opaque.
While the CLI tool includes tweaks to target modules compiled specifically
with [pybind11](https://github.com/pybind/pybind11) but it should work well with modules built with other libraries.
```bash
# 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
```
Raw data
{
"_id": null,
"home_page": "https://github.com/sizmailov/pybind11-stubgen",
"name": "pybind11-stubgen",
"maintainer": "Sergei Izmailov",
"docs_url": null,
"requires_python": "~=3.7",
"maintainer_email": "sergei.a.izmailov@gmail.com",
"keywords": null,
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/91/96/6f3f11aaccfb5416afcf5c338e266cc2e5d6ee328edbef9123d9bc0b0002/pybind11-stubgen-2.5.1.tar.gz",
"platform": null,
"description": "[![pypi](https://img.shields.io/pypi/v/pybind11-stubgen.svg?logo=PyPI&logoColor=white)](https://pypi.org/project/pybind11-stubgen/)\n\nAbout\n----\n\nStatic analysis tools and IDE usually struggle to understand python binary extensions.\n`pybind11-stubgen` generates [stubs](https://peps.python.org/pep-0561/) for python extensions to make them less opaque.\n\nWhile the CLI tool includes tweaks to target modules compiled specifically\nwith [pybind11](https://github.com/pybind/pybind11) but it should work well with modules built with other libraries.\n\n```bash\n# Install\npip install pybind11-stubgen\n\n# Generate stubs for numpy\npybind11-stubgen numpy\n```\n\nUsage\n-----\n\n```\npybind11-stubgen [-h]\n [-o OUTPUT_DIR]\n [--root-suffix ROOT_SUFFIX]\n [--ignore-invalid-expressions REGEX]\n [--ignore-invalid-identifiers REGEX]\n [--ignore-unresolved-names REGEX]\n [--ignore-all-errors]\n [--enum-class-locations REGEX:LOC]\n [--numpy-array-wrap-with-annotated|\n --numpy-array-use-type-var|\n --numpy-array-remove-parameters]\n [--print-invalid-expressions-as-is]\n [--print-safe-value-reprs REGEX]\n [--exit-code]\n [--stub-extension EXT]\n MODULE_NAME\n```\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "PEP 561 type stubs generator for pybind11 modules",
"version": "2.5.1",
"project_urls": {
"Homepage": "https://github.com/sizmailov/pybind11-stubgen"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "198cb91f68903370b374ba010a9ffa97bac4a09fe6e99bca9a28ea6620d1b608",
"md5": "798ae0452ab9c64f181c8b6480942406",
"sha256": "544d49df57da827c8761e7f6ef6bca996df80a33c9fd21c2521d694d4e72fe8d"
},
"downloads": -1,
"filename": "pybind11_stubgen-2.5.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "798ae0452ab9c64f181c8b6480942406",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.7",
"size": 29817,
"upload_time": "2024-03-29T01:24:29",
"upload_time_iso_8601": "2024-03-29T01:24:29.325305Z",
"url": "https://files.pythonhosted.org/packages/19/8c/b91f68903370b374ba010a9ffa97bac4a09fe6e99bca9a28ea6620d1b608/pybind11_stubgen-2.5.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "91966f3f11aaccfb5416afcf5c338e266cc2e5d6ee328edbef9123d9bc0b0002",
"md5": "23847f0185ef1afc27179156f18a031f",
"sha256": "4427a67038a00c5ac1637ffa6c65728c67c5b1251ecc23c7704152be0b14cc0b"
},
"downloads": -1,
"filename": "pybind11-stubgen-2.5.1.tar.gz",
"has_sig": false,
"md5_digest": "23847f0185ef1afc27179156f18a031f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.7",
"size": 24617,
"upload_time": "2024-03-29T01:24:32",
"upload_time_iso_8601": "2024-03-29T01:24:32.335462Z",
"url": "https://files.pythonhosted.org/packages/91/96/6f3f11aaccfb5416afcf5c338e266cc2e5d6ee328edbef9123d9bc0b0002/pybind11-stubgen-2.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-29 01:24:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sizmailov",
"github_project": "pybind11-stubgen",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pybind11-stubgen"
}