Metadata-Version: 2.1
Name: pydocify
Version: 0.1.8
Summary: LLM-based library to auto-generate docstrings for Python scripts and modules.
Home-page: https://github.com/rahulbhoyar1995/pydocify.git
Author: Rahul Bhoyar
Author-email: rahulbhoyaroffice@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

<img src="assets/pydocify_logo.png" alt="Logo" width="400"> <!-- Set the width to 100 pixels -->

# pydocify - LLM-Based Documentation Generator Library for Python Code

#### Author : Rahul Bhoyar

`pydocify` is a library that uses a language model (LLM) to generate and add documentation strings (docstrings) for Python scripts, functions, and classes. This is especially useful for maintaining code readability and consistency in projects with minimal documentation.

### Features
- Automatically generates docstrings based on code content.
- Archives original Python files before documentation is added.
- Recursively processes all Python files in a specified directory.
- Supports deleting archive files created during the documentation process.

### Installation
Install `pydocify` with pip:

```bash
pip install pydocify
```

### Usage

#### 1. Documenting All Python Files in a Directory
Use the DirectoryStringGenerator class to recursively document all Python files in a specified directory:

```bash
from pydocify.core import DirectoryStringGenerator

doc_generator = DirectoryStringGenerator()
doc_generator.generate("/path/to/your/directory")
```
#### 2. Deleting Archive Files during documentation process
Use delete_archives to remove any archive files created during the documentation process:

```bash
doc_generator.delete_archives("/path/to/your/directory")
```


#### 3. Documenting a Python File 
Use the FileStringGenerator class to document a Python file at specified path:

```bash
from pydocify.core import FileStringGenerator

file_doc_generator = FileStringGenerator()
file_doc_generator.generate("/path/to/your/file")
```

### Requirements
Ensure that you have your OPENAI_API_KEY set up as an environment variable in a .env file.

### License
pydocify is licensed under the MIT License.

