Skip to main content

AI-powered CLI tool for generating Python documentation strings effortlessly

Project description

Pythion

Pythion is a command-line interface (CLI) tool designed to assist Python developers by generating documentation strings using AI. With an easy-to-use interface built on the Click library, Pythion provides a seamless way to enhance your Python projects with well-structured docstrings and documentation management.

Features

  • Generate documentation strings for Python functions and classes.
  • Iterate through documents in specified directories.
  • Flexible options to include or exclude already documented functions.

Table of Contents

Installation

You can install Pythion via pip. Open your terminal and enter:

pip install pythion

Usage

After installing Pythion, you can invoke the command-line tool as follows:

pythion [OPTIONS] COMMAND [ARGS]...

Commands

1. make_docstr

Generates documentation for any given function or class name.

pythion make-docstr <root_dir>
  • Arguments:
    • root_dir: The path to the root directory containing the Python files to analyze.

Example:

pythion make-docstr /path/to/dir

2. build-doc-cache

Bulk builds a documentation cache for functions and methods in a specified directory.

This cache then can later be used via iter-docs

pythion build-doc-cache <root_dir> [--use_all]
  • Arguments:
    • root_dir: The directory path where the Python files are located.
  • Options:
    • -ua, --use_all: If set, generates docstrings for all functions; otherwise, only for those without docstrings.

Example:

pythion build-doc-cache /path/to/dir --use_all

3. iter-docs

Iterates through the documentation cache.

pythion iter-docs <root_dir>
  • Arguments:
    • root_dir: The path to the directory containing documents to be iterated.

Example:

pythion iter-docs /path/to/dir

NOTES

  • You must have an OpenAI API key saves on your environment for the key OPENAI_API_KEY

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

pythion-1.0.2.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythion-1.0.2-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file pythion-1.0.2.tar.gz.

File metadata

  • Download URL: pythion-1.0.2.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for pythion-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f60f7af1b5e518c5af153e0670417a5ce238c674c0ffef970ae05cdb98b5b833
MD5 553811a468a93c4fad816961f2bbb3df
BLAKE2b-256 1a47028b0d2ebf25b63ff86d45ae71d6fee4bffb410eac56feeddf2a88f76fb5

See more details on using hashes here.

File details

Details for the file pythion-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pythion-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for pythion-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 34b22211621ca808ea8489a7f29c73450f1e15fe636145436248bd4e9b4f9eee
MD5 fad4b7200910b3d4db99c0b0b333f4fa
BLAKE2b-256 2c427955ddf1de03d1476f1581d2ecb42ff8a7a7421ba19330a69a58bc64578b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page