Skip to main content

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.

Metadata

Release files for docstub 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docstub 0.6.0
File Size Uploaded
docstub-0.6.0.tar.gz 94.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docstub 0.6.0
File Interpreter ABI Platform
docstub-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 161.7 kB

Release files / docstub-0.6.0.tar.gz

Download URL docstub-0.6.0.tar.gz
Size 94.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6130d44dc932bb9b1833b565c1074def41572104bce05aa32b381f804788fdec
BLAKE2b-256 checksum
How to use checksums
6a6788138b42bd7cbc4685ec65964ffab418ef4327e137842058a5f02e30bdb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2025.

Transparency log

Release files / docstub-0.6.0-py3-none-any.whl

Download URL docstub-0.6.0-py3-none-any.whl
Size 67.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
142e69ca8fc4d8c5b9f8cc488e363735200bfdf32678eb6b7c10ab8410590cf4
BLAKE2b-256 checksum
How to use checksums
ee2b49af1a353fd24f3f941667bb05e7865ee3569856491d838e589eb3adeebc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.2.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page