Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Python DocString Generator AINew to Visual Studio Code? Get it now.
Python DocString Generator AI

Python DocString Generator AI

pyDocGenAI

|
45,090 installs
| (2) | Free
Python docstring generator, for functions, based on deep learning model, configurable.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Python DocString Generator AI

Installation

From the vscode market place (recommended):

  1. Open VSCode
  2. Go to the marketplace
  3. Write pyDocGenAI
  4. Install this extension. That's all.

From source:

  1. Clone this repository
  2. Go in code/pyDocGenAI
  3. Open a terminal and run npm install
  4. Open VSCode from the pyDocGenAI folder (! important its mandatory)
  5. Open the extension.ts file and click on Run > Start with debugging
  6. A window will appear, then open a python file and here we go.

Usage

When a python file is open, you can select a valid python function.

When you have a python file open in vscode, select a valid python function (like copy/paste text).

Then, you have several choices to generate the docstring of your function:

  • Use right click > Generate DocString

  • Use the shortcut CTRL + SHIFT + L (macos: CMD+SHIFT+L )

  • Stay with the mouse on the python function then click on the pop-up click here to generate docstring

  • Use command palette (CTRL+SHIFT+P or View > Command Palette) , execute the command : Generate DocString.

    Stay with mouse

Configuration

This extension is highly configurable. You can customize a lot of things like the docstring template generated by the model.

Be careful to put the keyword into bracket [PRED] to get the prediction of the model!

For those who like it can tweak the hyperparameters of the deep learning model.

The deep learning model used is codeBERT from microsoft.

To access to the configuration file go on File> Preferences > Settings > Extension > PyDocGenAI

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft