API

qkrun

A CLI tool for quick tasks.

qkrun.task

Create a task from a function.

qkrun.script

Create a script from a function.

qkrun.command

Create a command task from a function.

qkrun.Arg

A wrapper for argparse arguments.

qkrun.Namespace

Used to group tasks and modules under a shared path prefix.

qkrun.task_factory_helper

Create a task class from a function.

qkrun.group

Create a group task from a function.

qkrun.thread_group

Create a thread group task from a function.

qkrun.load_env_file

Load environment variables from a .env file and return them as a dict.

qkrun.tasks.Task

Base class for all tasks.

qkrun.tasks.Script

Base class for tasks that run a script.

qkrun.tasks.Command

Base class for tasks that run a binary.

qkrun.tasks.Group

Base class for tasks that run other tasks in sequence.

qkrun.tasks.ThreadGroup

Base class for tasks that run other tasks in threads.

qkrun.completion

Completers for task arguments.

qkrun.completion.BaseCompleter

Base class for completers.

qkrun.completion.PathCompleter

For auto-completing file paths.

qkrun.completion.python

Python completers for qkrun.

qkrun.completion.python.PytestCompleter

For auto-completion of paths, but also adds python module completion.

qkrun.conditions

Useful check tasks.

qkrun.conditions.condition

Decorator to create a condition from a function.

qkrun.conditions.FilesModified

Check if files have been not being modified.

qkrun.conditions.FirstRun

Check if the task is running for the first time.

qkrun.conditions.PathsExist

Check if the given paths exist.

qkrun.conditions.base

Contains the base classes for task conditions.

qkrun.conditions.base.BaseCondition

Base class for all conditions.

qkrun.config

Settings for qkrun.

qkrun.config.App

Represents the application configuration and other utilities available globally.

qkrun.context

Task context.

qkrun.context.Context

The context for a task.

qkrun.context.resolve_wd

Resolve a working directory value to an absolute path.

qkrun.errors

Errors for qkrun.

qkrun.errors.QkrunError

Base class for qkrun errors.

qkrun.errors.Stop

Raised when execution should stop.

qkrun.errors.TaskNotFoundError

Raised when a task is not found.

qkrun.errors.TasksModuleNotFoundError

Raised when a tasks module cannot be imported.

qkrun.factories

Factories for creating tasks from functions.

qkrun.factories.command

Create a command task from a function.

qkrun.factories.task_factory_helper

Create a task class from a function.

qkrun.factories.group

Create a group task from a function.

qkrun.factories.script

Create a script from a function.

qkrun.factories.task

Create a task from a function.

qkrun.factories.thread_group

Create a thread group task from a function.

qkrun.utils

Useful stuff.

qkrun.utils.argparser

qkrun argument parser utilities.

qkrun.utils.argparser.Arg

A wrapper for argparse arguments.

qkrun.utils.console

Console utilities for qkrun.

qkrun.utils.console.QkConsole

Extends the rich console to add more utility methods.

qkrun.utils.imports

Utilities for importing modules.

qkrun.utils.imports.import_from_path

Import a module from a path.