Generate Python stub files from docstrings
Project description
docstub
[!NOTE] In early development! Docstub is not feature-complete or thoroughly tested yet. Its behavior, configuration or command line interface may change significantly between releases.
docstub is a command-line tool to generate Python stub files. It extracts necessary type information from NumPyDoc 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 are translated into valid type annotations.
Installation & getting started
Please refer to the installation guide and introduction in our official documentation or in docs/ to get started.
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! 🚀
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. 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.
Acknowledgements
Thanks to docs2stubs by which this project was heavily inspired and influenced.
And thanks to CZI for supporting this work with an EOSS grant.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docstub-0.6.0.tar.gz.
File metadata
- Download URL: docstub-0.6.0.tar.gz
- Upload date:
- Size: 94.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6130d44dc932bb9b1833b565c1074def41572104bce05aa32b381f804788fdec
|
|
| MD5 |
abf9fae140ff5edc2cf1cb80297ee45e
|
|
| BLAKE2b-256 |
6a6788138b42bd7cbc4685ec65964ffab418ef4327e137842058a5f02e30bdb1
|
Provenance
The following attestation bundles were made for docstub-0.6.0.tar.gz:
Publisher:
cd.yml on scientific-python/docstub
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docstub-0.6.0.tar.gz -
Subject digest:
6130d44dc932bb9b1833b565c1074def41572104bce05aa32b381f804788fdec - Sigstore transparency entry: 667735397
- Sigstore integration time:
-
Permalink:
scientific-python/docstub@80a7ce455d8256ca772632b5a0c27b63ee649d0f -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/scientific-python
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@80a7ce455d8256ca772632b5a0c27b63ee649d0f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file docstub-0.6.0-py3-none-any.whl.
File metadata
- Download URL: docstub-0.6.0-py3-none-any.whl
- Upload date:
- Size: 67.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
142e69ca8fc4d8c5b9f8cc488e363735200bfdf32678eb6b7c10ab8410590cf4
|
|
| MD5 |
9cd2c9b404a48a9a70f65c1c78738d54
|
|
| BLAKE2b-256 |
ee2b49af1a353fd24f3f941667bb05e7865ee3569856491d838e589eb3adeebc
|
Provenance
The following attestation bundles were made for docstub-0.6.0-py3-none-any.whl:
Publisher:
cd.yml on scientific-python/docstub
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docstub-0.6.0-py3-none-any.whl -
Subject digest:
142e69ca8fc4d8c5b9f8cc488e363735200bfdf32678eb6b7c10ab8410590cf4 - Sigstore transparency entry: 667735410
- Sigstore integration time:
-
Permalink:
scientific-python/docstub@80a7ce455d8256ca772632b5a0c27b63ee649d0f -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/scientific-python
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@80a7ce455d8256ca772632b5a0c27b63ee649d0f -
Trigger Event:
workflow_dispatch
-
Statement type: