Name | pyo3-stubgen JSON |
Version |
0.3.0
JSON |
| download |
home_page | None |
Summary | Enable hinting for pyo3 extension modules by generating type and docstring stubs |
upload_time | 2024-06-30 16:46:39 |
maintainer | None |
docs_url | None |
author | Mike Foster |
requires_python | >=3.8 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pyo3-stubgen
`pyo3-stubgen` generates `.pyi` typing files for extension modules which were written in rust with pyo3.
It is designed to work for extension modules created in rust with pyo3 but should work with any compiled extension
modules which include a `__text_signature__` and optionally a `__doc__` attribute for functions.
Despite flake8's recommendation to the contrary, `pyo3_stubgen` adds docstrings to the `.pyi` files so that IDEs can
provide them in hover pop-ups.
You will need to manually add the typing information to the generated files as this is not included in any of the
function attributes available and is just as dependent upon the semantics of your functions as on the technical
implementation.
Note: Currently `pyo3_stubgen` only generates info for functions. Classes are on the to-do list.
## Installation
Install via pip:
```sh
(.venv)/projectroot$ pip install pyo3-stubgen
```
## Usage
Easiest from the command line:
```sh
(.venv)/projectroot$ pyo3-stubgen MODULENAME OUTPUTLOCATION
```
See `pyo3-stubgen --help` for more details
Alternatively via the python API. See [the docs](https://musicalninjas.github.io/pyo3-stubgen) for more details.
## Issues, Bugs, Ideas
Please contribute on github [MusicalNinjas/pyo3-stubgen](https://github.com/MusicalNinjas/pyo3-stubgen).
Raw data
{
"_id": null,
"home_page": null,
"name": "pyo3-stubgen",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Mike Foster",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/88/db/df405145366251eded9194a1bf2fdba544f44a4b5d571c519f7916ddec61/pyo3_stubgen-0.3.0.tar.gz",
"platform": null,
"description": "# pyo3-stubgen\n\n`pyo3-stubgen` generates `.pyi` typing files for extension modules which were written in rust with pyo3.\n\nIt is designed to work for extension modules created in rust with pyo3 but should work with any compiled extension\nmodules which include a `__text_signature__` and optionally a `__doc__` attribute for functions.\n\nDespite flake8's recommendation to the contrary, `pyo3_stubgen` adds docstrings to the `.pyi` files so that IDEs can\nprovide them in hover pop-ups.\n\nYou will need to manually add the typing information to the generated files as this is not included in any of the\nfunction attributes available and is just as dependent upon the semantics of your functions as on the technical\nimplementation.\n\nNote: Currently `pyo3_stubgen` only generates info for functions. Classes are on the to-do list.\n\n## Installation\n\nInstall via pip:\n\n```sh\n(.venv)/projectroot$ pip install pyo3-stubgen\n```\n\n## Usage\n\nEasiest from the command line:\n\n```sh\n(.venv)/projectroot$ pyo3-stubgen MODULENAME OUTPUTLOCATION\n```\n\nSee `pyo3-stubgen --help` for more details\n\nAlternatively via the python API. See [the docs](https://musicalninjas.github.io/pyo3-stubgen) for more details.\n\n## Issues, Bugs, Ideas\n\nPlease contribute on github [MusicalNinjas/pyo3-stubgen](https://github.com/MusicalNinjas/pyo3-stubgen).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Enable hinting for pyo3 extension modules by generating type and docstring stubs",
"version": "0.3.0",
"project_urls": {
"Changelog": "https://github.com/MusicalNinjas/pyo3-stubgen/blob/main/CHANGELOG.md",
"Documentation": "https://musicalninjas.github.io/pyo3-stubgen",
"Issues": "https://github.com/MusicalNinjas/pyo3-stubgen/issues",
"Repository": "https://github.com/MusicalNinjas/pyo3-stubgen"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "97fb92a4a232d31c00276085d03e6f96f28b940cc802cf69b07b8d892def293d",
"md5": "e66ab0fb2251328b43e544f88aabbec5",
"sha256": "a05c32ddf1981be043fa5015f24d625b4eb631c27769e0db475acf4b28e5acc3"
},
"downloads": -1,
"filename": "pyo3_stubgen-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e66ab0fb2251328b43e544f88aabbec5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5611,
"upload_time": "2024-06-30T16:46:38",
"upload_time_iso_8601": "2024-06-30T16:46:38.196000Z",
"url": "https://files.pythonhosted.org/packages/97/fb/92a4a232d31c00276085d03e6f96f28b940cc802cf69b07b8d892def293d/pyo3_stubgen-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "88dbdf405145366251eded9194a1bf2fdba544f44a4b5d571c519f7916ddec61",
"md5": "192d6d7c338065d8117bcc7a1341ee01",
"sha256": "57434fb833d5a3e54942e6f5fde486b56412bf02319cf528068254da58b95327"
},
"downloads": -1,
"filename": "pyo3_stubgen-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "192d6d7c338065d8117bcc7a1341ee01",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 5935,
"upload_time": "2024-06-30T16:46:39",
"upload_time_iso_8601": "2024-06-30T16:46:39.281355Z",
"url": "https://files.pythonhosted.org/packages/88/db/df405145366251eded9194a1bf2fdba544f44a4b5d571c519f7916ddec61/pyo3_stubgen-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-30 16:46:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MusicalNinjas",
"github_project": "pyo3-stubgen",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyo3-stubgen"
}