auto-generate documentaion for python code using llms
Project description
📝 docullim
auto-generate documentation for python code using llms.
💻 usage
add @docullim to the function or class you want to generate documention for. you can also pass a tag to the annotation like @docullim("custom_tag").
from docullim import docullim
@docullim
def add(a, b):
return a + b
@docullim("custom_tag")
def sub(a, b):
return a - b
docullim file1.py file2.py
docullim "src/**/*.py"
docullim --config docullim.json --model gpt-4 "src/**/*.py"
docullim --reset-cache --concurrency 3 --write file1.py "src/**/*.py"
config file is a json file that can have model as string, max_concurrency as number or prompts as string pairs.
docullim.json
{
"model": "gpt-4",
"max_concurrency": 5,
"prompts": {
"default": "Generate short and simple documentation explaing the code and include sample usage.",
"custom_tag": "this is a a diffrent propmt being passed to the llm when @docullim('custom_tag') is passed"
}
}
you should provide your llm api key provided as enviroment variable by default it requires OPENAI_API_KEY.
you can switch models and provide other llm api keys. See supported llms
🛠️ development
Install the following tools are needed to have this project running
- devbox manages all the packages needed by the project
- direnv loads env variables and run devbox when in project directory
also rename .env.example to .env and add your llm api key.
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 docullim-0.1.0.tar.gz.
File metadata
- Download URL: docullim-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.12.8 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbd31b5cb73477024cafc41123f7909473c9198706c6d154a1f974950a4fc382
|
|
| MD5 |
616ef09a99d19b336fe29a08ad20cb3e
|
|
| BLAKE2b-256 |
87098849ef1ed3ac0aea71979376101d2a8b90340fb7b210c5666562fdc500dd
|
File details
Details for the file docullim-0.1.0-py3-none-any.whl.
File metadata
- Download URL: docullim-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.12.8 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30c848fcaf40d580631ad1b2a05cb442544aa5d6999b89bfc461adc2d298a13c
|
|
| MD5 |
564aec8081e5d9c1f805160bf7c4d4ca
|
|
| BLAKE2b-256 |
cb799283fdc0cff8627cc5a8cb9367d80bb785e2ad49cf474a1b0e02926098fd
|