Skip to main content

Task-Automator is a modern Python framework for building declarative command-line interfaces with nested subcommands, designed for automation workflows and build systems.

Project description

Task-Automator - Declarative CLI Automation Framework

Python Version License

Supported Platforms

Windows macOS Linux

Overview | What is Task-Automator? | Features | Installation | Build | Defining Commands | License

[!IMPORTANT] 📣 As of March 2025 Task-Automator is still in early development. 📣

Task-Automator is a best-effort open project library. This means that support is not guaranteed and how long the project will be maintained is unknown.

What is Task-Automator?

Task-Automator is a modern Python framework for building declarative command-line interfaces
with nested subcommands, designed for automation workflows and build systems.

Task-Automator is implemented in pure Python that enables scripting of more complicated tasks.

Features

  • 🚀 Declarative Command Tree - Define CLI structure through simple nested dictionaries
  • 🛠 Zero Boilerplate - Focus on business logic, not argument parsing
  • 📚 Automatic Help Generation - Built-in help system with hierarchical documentation
  • 🌳 Hierarchical Commands - Support for unlimited nested subcommands
  • 🖥 Cross-Platform - Works on Windows, Linux, and macOS
  • 📚 Filesystem & Web utils: Utility functions for filesystem operations and web

Installation

You can use pip to install Task-Automator

pip install task-automator

Build

Task-Automator uses Poetry for its build process. To build the wheel file and source distribution run:

poetry build

Defining Commands

Create your automation structure in a Python module (like my_automator.py):

...
import build_macos_wheel
import build_macos_exe
import build_macos_so
import run_pytest
import dev_env


AUTOMATION_TREE = {
  "setup": {
    "help": "Setup automations",
    "subcommands": {
      "dev-env": {
        "help": "Sets up the development environment",
        "func": dev_env.setup_dev_env
      }
    }
  },
  "build": {
    "help": "Build targets",
    "subcommands": {
      "wheel": {
        "help": "Builds the Python wheel file",
        "func": build_macos_wheel.build_wheel
      },
      "exe": {
        "help": "Creates a frozen Python application",
        "func": build_macos_exe.build
      },
      "so": {
        "help": "Compiles the _cmd module from source",
        "func": build_macos_so.build_cmd_module
      }
    }
  },
  "test": {
    "help": "Runs all tests under the tests/ directory using pytest.",
    "func": run_pytest.run_pytest_suite
  }
}


if __name__ == "__main__":
  from task_automator import automator
  automator.Automator(AUTOMATION_TREE).run()

Important Note

If you connect your automation functions in the tree using the func key, you must NOT add parenthesis after the function name! Otherwise, it will sequentially execute your tree and ignore all passed arguments.

License

This project is licensed under the BSD-3 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

task_automator-0.2.3.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

task_automator-0.2.3-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file task_automator-0.2.3.tar.gz.

File metadata

  • Download URL: task_automator-0.2.3.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.9 Windows/10

File hashes

Hashes for task_automator-0.2.3.tar.gz
Algorithm Hash digest
SHA256 a4dcf1e95e3d56e32d575d2dfffcf5a0810f25086e0c725fb6790183642240b4
MD5 624bffbf8606c152a1430945e82d2c0e
BLAKE2b-256 fa0f60f77d5e493e5ce4112163ec9be0113d9bd389440804d6ca4dcde7689d23

See more details on using hashes here.

File details

Details for the file task_automator-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: task_automator-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.9 Windows/10

File hashes

Hashes for task_automator-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 03e201a3afc122364aefc61b46fd7d1233159030d4049219bc96c20eea39ec37
MD5 ef18666aa0a139ab4450494e7ccc868a
BLAKE2b-256 c0aae358c96a06704e14bd7a5f52ff8ed97e95462d65fd2f77b4101d73f0f16c

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