A python library for generating documentation for python projects.
Project description
documentation-generator
Overeview
This is a python library for generating documentation for python projects. It is built to:
- Generate function docstrings
- Generate class docstrings include class method docstrings (still under development)
- Generate sphinx documentation (still under development)
The library uses openai's
gpt model to generate the function docstrings. You pass it a file or folder path togther with an openai
api key. It then parses the folder for python files, then for each file, it finds the functions and classes, generates their documentation and updates their docstrings.
Requirements
- Python 3.10+
- Works on Linux, Windows, macOS, BSD
Installation
pip install oryks-docstring-generator
Usage
First, provide the openai
api key:
export OPENAI_API_KEY=sk-xxxxxxxxxxx
Then run the application, providing the path to the python file to generate docs for or the folder containing the python files:
python -m docstring_generator --path /home/lyle/tutorial/test-docstrings-generator/test/ --directories-ignore venv
--files-ignore test.py --overwrite-function-docstring True --overwrite-class-docstring True --overwrite-class-methods-docstring True --documentation-style Numpy-Style
Documentation and Tutorials
To learn more about the library including the documentation and tutorials, check out the libraries' documentation.
How to Contribute
To contribute, chack out the contribution guideline.
License
The API uses an MIT License
Developer
Lyle Okoth – @lyleokoth on twitter
lyle okoth on medium
My email is lyceokoth@gmail.com
Here is my GitHub Profile
You can also find me on Linkedin
Project details
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
File details
Details for the file oryks-docstring-generator-0.5.0.tar.gz
.
File metadata
- Download URL: oryks-docstring-generator-0.5.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8ad11ee0a3f88fb57984c412461f5697565dd35f7f2cdae34ea558ceb036da9 |
|
MD5 | 2de60232bfbab3a008acbfa2f03e86ce |
|
BLAKE2b-256 | babde20b84148bb676eecce71255658c8dfa82d2051c1f3b5c8071039f541eef |
File details
Details for the file oryks_docstring_generator-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: oryks_docstring_generator-0.5.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34b14794e77bafff6733c1986d58d7a1243b4387ce2f52f70758e475953cd7a7 |
|
MD5 | 13973b9deec514421b28782fb2c3801e |
|
BLAKE2b-256 | 9d8d8da6100f2290d2ca8c1a44176c0d2a5acf6b7d26f3f16482948aeff10904 |