This python module can shorten, reformat and add docstrings to your python files using OpenAI API.
You need .env file containing your OpenAI API key in OPENAI_API_KEY variable.
Or you can export api key manually:
export OPENAI_API_KEY=your_api_key_here
You can install this package from pip:
pip install https://github.com/pf-github-pl/openai_helper/releases/download/0.1/openai_helper-0.1.tar.gz
Run the following command:
python3 -m openai_helper your_source_file.py output_file.py