pydocify: An LLM-based library that effortlessly auto-generates docstrings for your Python scripts and modules, enhancing code readability with ease.
Project description
pydocify - LLM-Based Documentation Generator Library for Python Code
Author : Rahul Bhoyar
Transform Your Python Code with pydocify!
Unlock the power of documentation with pydocify, an innovative LLM-based library that automatically generates clear and concise docstrings for your Python scripts and modules. Say goodbye to the hassle of writing documentation from scratch! Whether you're maintaining a small project or collaborating on a large codebase, pydocify enhances code readability and consistency, ensuring your functions and classes are well-documented and easy to understand. Elevate your coding experience and keep your projects organized with just a few simple commands!
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:
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:
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:
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:
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydocify-0.2.tar.gz.
File metadata
- Download URL: pydocify-0.2.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.8rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bf594b16bc1d693f12468f89b1aa15f432e3a7d653811dffd4140eab1433d95
|
|
| MD5 |
cd5787e2ca37520abf57adb389731aba
|
|
| BLAKE2b-256 |
7d0d3fba19f168bacac29679e019ae3ff80555555a8a567a7f1aed1095663c17
|
File details
Details for the file pydocify-0.2-py3-none-any.whl.
File metadata
- Download URL: pydocify-0.2-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.8rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6861274dea59826e3143b475233a9ccd6ecec681daa32e116b5222e686fd0ebd
|
|
| MD5 |
f2165a9f786d1fbc678fd10931ea736b
|
|
| BLAKE2b-256 |
467f42ac4d6dcf73fa474587475ae4d4200f6f2d1f5cc1fec76c804ddb67ae2c
|