Skip to main content

GPT-Documenter

GPT-Documenter is a small project that automates the process of documenting Python functions by using GPT-3.5 along with Langchain.

Installation

-

git clone https://github.com/username/gpt-documenter.git

Usage

GPT-Documenter utilizes Python Typer and provides two main commands:

  1. inspect
  2. document-functions

inspect

The inspect command allows you to preview the documentation setup and receive an estimate of token usage. To use the inspect command, provide the following parameters:

  • project_path: The path of the project you want to document
  • output_path: The path where the JSON result will be saved
  • excluded_paths: A list of paths you want to avoid, with project_path as root.

Here's an example of how to use the inspect command:

python main.py inspect /path/to/project /path/to/output.json directory/to/avoid, file_to_avoid.py

document-functions

The document-functions command generates the actual documentation for the Python functions in your project. You'll need to provide the same arguments as the inspect command, along with your OpenAI API key:

  • openai_api_key: Your OpenAI API key
  • project_path: The path of the project you want to document
  • output_path: The path where the JSON result will be saved
  • exclude_paths: A list of paths you want to avoid, with project_path as root.

Here's an example of how to use the document-functions command:

python main.py document-functions YOUR_API_KEY /path/to/project /path/to/output.json directory/to/avoid, file_to_avoid.py

Once the command is executed, GPT-Documenter will begin generating the documentation for the functions and save the result as a JSON file in the specified output path.

Metadata

Release files for gptdocumenter 0.1.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 gptdocumenter 0.1.0
File Size Uploaded
gptdocumenter-0.1.0.tar.gz 7.7 kB Details

Built distribution (wheel)

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

Total release size: 16.8 kB

Release files / gptdocumenter-0.1.0.tar.gz

Download URL gptdocumenter-0.1.0.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
352a7b3a8a7dcb9bbf2a810f5258b1ed9c64f07edd69226819c333afafa47656
BLAKE2b-256 checksum
How to use checksums
d90c174d3ecb1420cc254f722f002e06722ec58075af7e7c419fc1a659b7e3de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / gptdocumenter-0.1.0-py3-none-any.whl

Download URL gptdocumenter-0.1.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40df8f58db00795264ae90e8942a2375a1817bf2880661ac9cb51db598024ed9
BLAKE2b-256 checksum
How to use checksums
9da02797e2c428024de2cbc87b796fdf6fb00b14e169efd6757e81f233560801
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

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