DEVELOPER TOOL

Python Docstring Generator

Generate a Google, NumPy, or reST-style docstring from a function signature.

About this tool

Paste a function signature and get a ready-to-fill docstring stub in Google, NumPy, or reST/Sphinx style — every parameter (including *args, **kwargs, keyword-only params, type hints, and defaults) is picked up automatically, so you just fill in the descriptions.

Frequently asked questions

Which style should I use?
Google style is common in general Python projects and reads well as plain text; NumPy style is the convention for scientific/data libraries (numpy, pandas, scipy); reST/Sphinx style is the classic choice for Sphinx-generated documentation. Match whatever your project already uses.
Does this understand type hints?
Yes — parameter and return type annotations (like to: str or -> bool) are extracted and included in the generated docstring where each style expects a type.
What if my signature spans multiple lines?
That's fine — paste it exactly as written, including line breaks between parameters; the parser only cares about matching parentheses, not line breaks.