Overview Version History Q & A Rating & Review
Py DocString Pro
The Py DocString Pro is a Visual Studio Code extension that allows you to effortlessly generate docstrings for your Python functions using powerful Large Language Models (LLMs). This extension supports two LLM service providers: Groq and Hugging Face .
Features
Seamless Integration: Generate comprehensive docstrings for Python functions with just a few clicks.
Flexible Service Options: Choose between Groq or Hugging Face as your LLM service provider.
Customizable: Use your own API keys for secure and personalized access to LLMs.
Getting Started
Prerequisites
Install Visual Studio Code .
Ensure you have a Python file open in the editor.
Setup Instructions
Obtain API Keys:
Configure the Extension:
Open the command palette (Ctrl+Shift+P
on Windows or Cmd+Shift+P
on macOS).
Search for "Preferences: Open Settings (UI)".
Navigate to the Py DocString Pro section.
Select the Service you will be willing to use Groq or HuggingFace.
Enter your API key for the selected service:
Groq API Key
: For Groq LLMs.
Hugging Face Token
: For Hugging Face LLMs.
How to Use
Open a Python File: Open the Python file containing the function you want to document.
Select the Function: Highlight the function for which you want to generate a docstring.
Run the Command:
a. Using the Command Palette.
Open the command palette (Ctrl+Shift+P
on Windows or Cmd+Shift+P
on macOS).
Type Get DocString
in the search bar.
Select the Get Doc String
command.
b. Using shortcut key
After highligting(selecting) the function press Ctrl+D
(windows) or cmd+D
(mac)
Wait for the Docstring: The extension will generate a docstring for the selected function and insert it into your code.
Configuration Options
Setting
Description
Default
Service Selection
Choose between Groq and Hugging Face as the LLM provider.
Groq
Groq API Key
API key for Groq LLM service.
(Required)
Hugging Face Token
Token for Hugging Face LLM service.
(Required)
Demo Video
Instruction Video
For Groq LLM Service
For Groq LLM Service
Troubleshooting
Missing API Key Error: Ensure you’ve added the correct API key in the extension settings.
No Docstring Generated: Verify that the function is selected before running the command.
Service-Specific Issues: Check your API key and service limits for Groq or Hugging Face.
Feedback and Support
If you encounter any issues or have suggestions, feel free to open an issue on the GitHub repository or contact the developer.
Happy Coding! 🎉