Name | docstub JSON |
Version |
0.4.0
JSON |
| download |
home_page | None |
Summary | Generate Python stub files from docstrings |
upload_time | 2025-08-10 15:05:47 |
maintainer | Lars Grüter |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | None |
keywords |
typing
stub files
docstings
numpydoc
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# docstub
> [!NOTE]
> **In early development!**
> Expect bugs, missing features, and incomplete documentation.
> Docstub is still evaluating which features it needs to support as the community gives feedback.
> Several features are experimental and included to make adoption of docstub easier.
> Long-term, some of these might be discouraged or removed as docstub matures.
docstub is a command-line tool to generate [Python stub files](https://typing.python.org/en/latest/guides/writing_stubs.html) (i.e., PYI files) from type descriptions found in [numpydoc](https://numpydoc.readthedocs.io)-style docstrings.
Many packages in the scientific Python ecosystem already describe expected parameter and return types in their docstrings.
Docstub aims to take advantage of these and help with the adoption of type annotations.
It does so by supporting widely used readable conventions such as `array of dtype` or `iterable of int(s)` which it translates into valid type annotations.
## Installation & getting started
Please refer to the [user guide](https://github.com/scientific-python/docstub/blob/main/docs/user_guide.md) to get started with docstub.
## Contributing
The best way you can help and contribute right now is by trying docstub out!
Feedback to what features might still be missing or where it breaks for you would be greatly appreciated.
As well as pointers to where the documentation is confusing and unclear.
Feel welcome to [open an issue](https://github.com/scientific-python/docstub/issues/new/choose)! 🚀
Since docstub is still in early development there isn't an official contribution guide yet.
Features and API are still being heavily extended and the internal structure is still somewhat in flux.
The development is, in part, motivated by an effort to add type annotations to the [scikit-image project](https://scikit-image.org).
This may inform some short-term priorities and the roadmap.
That said, docstub is a project for the community and welcomes contributions in any form!
Please do check in with an issue if you are interested in working on something.
Our project follows the [Scientific Python's Code of Conduct](https://scientific-python.org/code_of_conduct/).
## Acknowledgements
Thanks to [docs2stubs](https://github.com/gramster/docs2stubs) by which this
project was heavily inspired and influenced.
And thanks to CZI for supporting this work with an [EOSS grant](https://chanzuckerberg.com/eoss/proposals/from-library-to-protocol-scikit-image-as-an-api-reference/).
Raw data
{
"_id": null,
"home_page": null,
"name": "docstub",
"maintainer": "Lars Gr\u00fcter",
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "typing, stub files, docstings, numpydoc",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/9d/e5/edd4869755c35ecae27c5efd3cc82687ce6cccf21afc5fba22bfc24160f6/docstub-0.4.0.tar.gz",
"platform": null,
"description": "# docstub\n\n> [!NOTE]\n> **In early development!**\n> Expect bugs, missing features, and incomplete documentation.\n> Docstub is still evaluating which features it needs to support as the community gives feedback.\n> Several features are experimental and included to make adoption of docstub easier.\n> Long-term, some of these might be discouraged or removed as docstub matures.\n\ndocstub is a command-line tool to generate [Python stub files](https://typing.python.org/en/latest/guides/writing_stubs.html) (i.e., PYI files) from type descriptions found in [numpydoc](https://numpydoc.readthedocs.io)-style docstrings.\n\nMany packages in the scientific Python ecosystem already describe expected parameter and return types in their docstrings.\nDocstub aims to take advantage of these and help with the adoption of type annotations.\nIt does so by supporting widely used readable conventions such as `array of dtype` or `iterable of int(s)` which it translates into valid type annotations.\n\n\n## Installation & getting started\n\nPlease refer to the [user guide](https://github.com/scientific-python/docstub/blob/main/docs/user_guide.md) to get started with docstub.\n\n\n## Contributing\n\nThe best way you can help and contribute right now is by trying docstub out!\nFeedback to what features might still be missing or where it breaks for you would be greatly appreciated.\nAs well as pointers to where the documentation is confusing and unclear.\nFeel welcome to [open an issue](https://github.com/scientific-python/docstub/issues/new/choose)! \ud83d\ude80\n\nSince docstub is still in early development there isn't an official contribution guide yet.\nFeatures and API are still being heavily extended and the internal structure is still somewhat in flux.\nThe development is, in part, motivated by an effort to add type annotations to the [scikit-image project](https://scikit-image.org).\nThis may inform some short-term priorities and the roadmap.\n\nThat said, docstub is a project for the community and welcomes contributions in any form!\nPlease do check in with an issue if you are interested in working on something.\n\nOur project follows the [Scientific Python's Code of Conduct](https://scientific-python.org/code_of_conduct/).\n\n\n## Acknowledgements\n\nThanks to [docs2stubs](https://github.com/gramster/docs2stubs) by which this\nproject was heavily inspired and influenced.\n\nAnd thanks to CZI for supporting this work with an [EOSS grant](https://chanzuckerberg.com/eoss/proposals/from-library-to-protocol-scikit-image-as-an-api-reference/).\n",
"bugtrack_url": null,
"license": null,
"summary": "Generate Python stub files from docstrings",
"version": "0.4.0",
"project_urls": {
"Homepage": "https://github.com/lagru/docstub"
},
"split_keywords": [
"typing",
" stub files",
" docstings",
" numpydoc"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d126b7152a2055d2c99ffb5651b0e5ca056c767f5cce77d00983f3e510e578ba",
"md5": "1e633e12b5d9251a13f65f0c0642bdb8",
"sha256": "08141696285366512f8e791c3fdd6c5306c163254dc1cda07e539a211bf53d1d"
},
"downloads": -1,
"filename": "docstub-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1e633e12b5d9251a13f65f0c0642bdb8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 44498,
"upload_time": "2025-08-10T15:05:46",
"upload_time_iso_8601": "2025-08-10T15:05:46.338771Z",
"url": "https://files.pythonhosted.org/packages/d1/26/b7152a2055d2c99ffb5651b0e5ca056c767f5cce77d00983f3e510e578ba/docstub-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9de5edd4869755c35ecae27c5efd3cc82687ce6cccf21afc5fba22bfc24160f6",
"md5": "1ef013b31247d4e6c5b9ab0a8a1307ac",
"sha256": "3371c068aeb2f0210b9ac1cb39271d203476e8498fd88d43505dbaff280e76a8"
},
"downloads": -1,
"filename": "docstub-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "1ef013b31247d4e6c5b9ab0a8a1307ac",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 68847,
"upload_time": "2025-08-10T15:05:47",
"upload_time_iso_8601": "2025-08-10T15:05:47.732783Z",
"url": "https://files.pythonhosted.org/packages/9d/e5/edd4869755c35ecae27c5efd3cc82687ce6cccf21afc5fba22bfc24160f6/docstub-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-10 15:05:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lagru",
"github_project": "docstub",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "docstub"
}