A library for generating docstring for python programms.
Project description
PyDocGenerator
PyDocGenerator is a Python library that automatically generates docstrings for Python functions. It takes a Python file as input, generates docstrings for each function in the file, and outputs a new Python file with the generated docstrings.
Features
- Automatically generate docstrings for Python functions
- Easy to use: just pass the file name to the DocGen instance and call the write_to_file() method
Installation
You can install PyDocGenerator by cloning the repository or using pip: git clone
Dependencies
-
transformers: A library for natural language processing using pre-trained models. pip install transformers
-
torch: The PyTorch library for deep learning and neural networks. pip install torch
-
astunparse: A Python library for parsing and un-parsing abstract syntax trees (ASTs). pip install astunparse
Usage
Here’s a simple example of how to use DocGen-AI:
from pydocgenerator.pydoc import PyDOC
py_doc = PyDOC('./filename.py')
py_doc.write_to_file()
In this example, DocGen is instantiated with the path to a Python file ('./filename.py'). The write_to_file() method is then called to generate docstrings for each function in the file and output a new Python file with docstrings attached.
License
DocGen-AI is licensed under the MIT License. See the LICENSE file for more information.
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 pydcogenerator-0.1.0.tar.gz.
File metadata
- Download URL: pydcogenerator-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b69297a69fe86bb77ee7b798a79963fabb5b28e6b137eee57db4dc748ebd6f9
|
|
| MD5 |
601f8d6b69c2bf46fbf9d9742fa97f0c
|
|
| BLAKE2b-256 |
5a506c0c9b181eda47b26945a41b780a9f24ae31d23595a81267b21ed5354b49
|
File details
Details for the file pydcogenerator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pydcogenerator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b0b6f084c3f374953678d80afd0216a043c7eacee4a3eadf6fa127547d670d2
|
|
| MD5 |
f6160ae1acbf54a6abc99b10aaf642ad
|
|
| BLAKE2b-256 |
8316b7f7b44347f704aedd48c4ce2941ce8618e5cddd35eaba3a3cb0cbd68668
|