๐ŸŒ
Sphinx
sphinx-doc.org โ€บ en โ€บ master โ€บ tutorial โ€บ automatic-doc-generation.html
Automatic documentation generation from code โ€” Sphinx documentation
To use autodoc, first add it to the list of enabled extensions: ... Next, move the content of the .. py:function directive to the function docstring in the original Python file, as follows:
Discussions

Automatically Generate Python Docstrings with LLMs
My code is being sent to the LLM? More on reddit.com
๐ŸŒ r/Python
39
40
February 28, 2024
Function Docstring Generator
Hey all, there are many tools/packages aimed towards building documentation from code, however I was wondering if someone could point me in the direction of a module designed to automatically generate function docstrings? So something along the lines of def my_func(n: int) -> int: return n*n ... More on discuss.python.org
๐ŸŒ discuss.python.org
3
0
April 12, 2021
Is there anyway to generate doc strings for Python code using Github Copilot (VS Code) - Stack Overflow
After completing your initial functions, place your cursor at the : character after the function definition, press enter, and begin typing """. Copilot will automatically generate a docstring for you. More on stackoverflow.com
๐ŸŒ stackoverflow.com
python - How to auto-generate the type of a field in a docstring in PyCharm? - Stack Overflow
When I create a function with parameters, PyCharm offers me to create the docstring with :param param_name: field, which is pretty good. But I also need to add the :type param_name:. So from that ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
๐ŸŒ
PyPI
pypi.org โ€บ project โ€บ docstring-generator
docstring-generator
JavaScript is disabled in your browser. Please enable JavaScript to proceed ยท A required part of this site couldnโ€™t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
๐ŸŒ
Towards Data Science
towardsdatascience.com โ€บ home โ€บ latest โ€บ how to generate docstrings for data science projects
How to Generate Docstrings for Data Science Projects | Towards Data Science
January 22, 2025 - Use Generate Docstring from VsCode's command palette ... This will populate the function body in the following manner. ... The _summary_, _type_and _description_ are placeholders that we need to replace with actual descriptions. autoDocString ...
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ automatically generate python docstrings with llms
r/Python on Reddit: Automatically Generate Python Docstrings with LLMs
February 28, 2024 -

Thank you for the all the great feedbacks on my last post.

Context:

What My Project Does?

Penify is a GitHub App that auto-generates and dynamically updates documentation for your repo. It supports various styles like Google, Numpy, reST, and Epydoc, ensuring your documentation stays current with every change.

Check it out: [Penify GitHub App](https://github.com/apps/penify-dev).

Here's how it works in action: [Sample PR](https://github.com/NVIDIA/trt-llm-rag-windows/pull/44/files).

Updates:

  1. Generates consistent style docstrings: Google, reST, Numpy, Epydoc.

  2. Reduces hallucination through improved prompts and more context.

  3. Offers Full Repo documentation generation - previously it used to generate docs for only code changes.

Working on

  • ignore-private

  • ignore-semiprivate

  • ignore-init-method

  • ignore-setters-getters

Target Audience:

  • Ideal for freelance developers requiring high-quality project documentation.

  • Perfect for project managers desiring updated codebase docs for smooth onboarding of new developers.

Alternatives: Copilot & Tabnine Cons:

  1. In consistent style docstring style - sometimes it generates Google,Numpy....

  2. Context selection is very limited in Co-pilot

  3. Need to manually do doc updates for each modified code; Penify does it automatically in the background(it detects code changes and generates docs)

Pros:

  1. You can update the modified docstring before pushing it.

I know the community believes that Docstring generation shouldn't be done by LLMs - but I am seeing some good results. Hence, I am giving my effort. Please try and let me know your feedback.

๐ŸŒ
Python.org
discuss.python.org โ€บ python help
Function Docstring Generator - Python Help - Discussions on Python.org
April 12, 2021 - Hey all, there are many tools/packages aimed towards building documentation from code, however I was wondering if someone could point me in the direction of a module designed to automatically generate function docstrings? So something along the lines of def my_func(n: int) -> int: return n*n (now running the module from the commandline) def my_func(n: int) -> int: """[summary placeholder] Args: param1 (int) : [param1 placeholder] Returns: int: [Return value...
๐ŸŒ
Pdoc3
pdoc3.github.io โ€บ pdoc
pdoc โ€“ Auto-generate API documentation for Python projects
Enter pdoc, the perfect documentation generator for small-to-medium-sized, tidy Python projects. It generates documentation simply from your project's already-existing public modules' and objects' docstrings, like sphinx-apidoc or sphinx.ext.autodoc, but without the hassle of these tools.
Find elsewhere
๐ŸŒ
GitHub
github.com โ€บ airtai โ€บ docstring-gen
GitHub - airtai/docstring-gen: Generator for docstrings ยท GitHub
docstring-gen is an easy-to-use Python library that uses OpenAIโ€™s Codex model to automatically generate Google-style docstrings for Python codebase. The library is capable of reading both Jupyter notebooks and Python files, and seamlessly adds meaningful docstrings to classes and functions that lack documentation.
Starred by 19 users
Forked by 5 users
Languages: Jupyter Notebook 78.9% | Python 19.2%
๐ŸŒ
Medium
medium.com โ€บ @madhok.simran8 โ€บ how-to-generate-python-docstring-with-chatgpt-openapi-ed055f302d31
How to generate Python DocString with ChatGPT OpenAPI | by Simran Madhok | Medium
March 26, 2023 - prompt = f"Generate Python documentation for the following function:\n\n{avg.__name__}{avg.__doc__}" response = openai.Completion.create( engine="text-davinci-002", prompt=prompt, max_tokens=100, n=1, stop=None, temperature=0.5, ) Step 5. Generate documentation ยท Finally, we extract the generated documentation from the API response and print it to the console.
๐ŸŒ
Python
wiki.python.org โ€บ moin โ€บ DocumentationTools
DocumentationTools - Python Wiki
You can read a module's docstrings from the Python interactive prompt with the help() function. For example: ... The help() function uses Python's standard pydoc module, as does the pydoc command that comes with Python. autosummary, an extension for the Sphinx documentation tool. autodoc, a Sphinx-based processor that processes/allows reST doc strings. pdoc, a simple Python 3 command line tool and library to auto-generate API documentation for Python modules.
๐ŸŒ
Reddit
reddit.com โ€บ r/emacs โ€บ python automatic docstring?
r/emacs on Reddit: Python automatic docstring?
April 2, 2022 -

I've been programming in python for a few years now and recently I started in my first job as a python backend programmer. Never liked using those big IDE but, since my whole team uses VS Code, I thought to give it a go and generate the least amount of friction on the first week. Yeah, didn't like.

BUT what I've loved was a VS Code extension named "auto doc string" which could automatically create a doc string and already place some information, like which arguments, what are the returns and, most important, type annotations were reflected in the doc string.

Sure, there must be a package in emacs that could do all that, right? I have yet to found it. The closest I got was yasnippet-radical-snippets, but it doesn't support types (yet).

Does anyone know a better tool for the job?

๐ŸŒ
GitHub
github.com โ€บ MichaelisTrofficus โ€บ gpt4docstrings
GitHub - MichaelisTrofficus/gpt4docstrings: Generating Python docstrings with OpenAI ChatGPT!!
Here is a full example using gpt4docstring to generate docstrings for the python code inside example/example.py.
Starred by 125 users
Forked by 12 users
Languages: Python 100.0% | Python 100.0%
๐ŸŒ
GitHub
github.com โ€บ mannasoumya โ€บ py-docstring-generator
GitHub - mannasoumya/py-docstring-generator: Auto Generate Python Docstrings ยท GitHub
Auto Generate Python Docstrings. Contribute to mannasoumya/py-docstring-generator development by creating an account on GitHub.
Author: mannasoumya
๐ŸŒ
Visual Studio Marketplace
marketplace.visualstudio.com โ€บ items
AI Python Docstring Generator - Visual Studio Marketplace
November 19, 2020 - Extension for Visual Studio Code - Automatically generates summary for python functions using AI
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ what tools do you use to auto-generate api docs in python packages?
r/Python on Reddit: What tools do you use to auto-generate api docs in python packages?
August 22, 2023 -

Hey,

I've been lately writing Declarai, an open-source llm-related library.

The need for a clear API reference documentation came fast and I started looking for good auto-generate documentation tools.

Up until now, I found mkdocstrings the best choice as im using mkdocs anyhow.

Do you guys aware of any other great tools for api documentation auto-generation ?

๐ŸŒ
Reddit
reddit.com โ€บ r/emacs โ€บ automatic python docstring generation?
r/emacs on Reddit: Automatic python docstring generation?
February 10, 2021 -

Is there a way to generate a docstrings in python-mode?

  1. You can use a yasnippet like here. But this requires to write out the whole definition of the function in one go when you start out. This is OK for very simple functions, but most of the time this doesn't really fit my workflow.

  2. You can use sphinx-doc. This almost works for me: write out function, when happy it generates the docstring. BUT: doesn't work with type annotated functions

  3. There seems to be a hacky solution with elisp+python script... Haven't tried it, but if it still works, I'd prefer not to muck about with a separate pyhton script...

Is there anything that I've missed? Thanks!

๐ŸŒ
Towards Data Science
towardsdatascience.com โ€บ home โ€บ latest โ€บ step by step basics: code autodocumentation
Step by Step Basics: Code Autodocumentation | Towards Data Science
January 24, 2025 - Top tip. download the 'autoDocstring - Python Docstring Generator' in VS Code to automatically generate a docstring when you type three double quotation marks (i.e. the start of a docstring).