Skip to main content

Taskick

pypi-taskick

Taskick is an event-driven Python library that automatically executes scripts or any commands. It not only automates tedious routine tasks and operations, but also makes it easy to develop applications.

日本語版 README

The main features of Taskick are as follows

  • Automatically execute commands and scripts.
  • Script execution timing can be managed in a configuration file (YAML).
  • You can specify datetime and directory/file operations as task triggers.

And,

  • Execution schedules can be specified in Crontab format.
  • Watchdog is used to detect directory and file operations. Any events API provided by Watchdog can be specified in the configuration file.

Installation

$ pip install taskick
$ python -m taskick
Taskick 0.1.6
usage: python -m taskick [-h] [--verbose] [--version] [--batch-load BATCH_LOAD]
                         [--file FILE [FILE ...]] [--log-config LOG_CONFIG]

optional arguments:
  -h, --help            show this help message and exit
  --verbose, -v         increase the verbosity of messages: '-v' for normal output, '-vv' for more
                        verbose output and '-vvv' for debug
  --version, -V         display this application version and exit
  --batch-load BATCH_LOAD, -b BATCH_LOAD
                        configuration files can be load in batches
  --file FILE [FILE ...], -f FILE [FILE ...]
                        specify configuration files (YAML) for the task to be executed
  --log-config LOG_CONFIG, -l LOG_CONFIG
                        specify a logging configuration file
$ python -m taskick -V
Taskick 0.1.6

Toy Example

Here is a toy-eample that converts a PNG image to PDF. In this sample, the conversion script is automatically invoked when it detects that a PNG image has been saved to a specific folder. The script converts the PNG to PDF and saves it in another folder.

First, clone taskick-example.

git clone https://github.com/atsuyaide/taskick-example.git

Then, execute the following command.

$ cd taskick-example
$ pip install -r requirements.txt
$ python -m taskick -b batch.yaml -vv
INFO:taskick:Loading: ./config/welcome.yaml
INFO:taskick:Processing: Welcome_taskick
INFO:taskick:Startup option is selected.
INFO:taskick:Registered
INFO:taskick:Loading: ./config/main.yaml
INFO:taskick:Processing: remove_files_in_input_folder
INFO:taskick:Startup option is selected.
INFO:taskick:Await option is selected.
INFO:taskick:Registered
INFO:taskick:Processing: png2pdf
INFO:taskick:Registered
INFO:taskick:Executing: Welcome_taskick
INFO:taskick:"remove_files_in_input_folder" is waiting for "Welcome_taskick" to finish.
Sun Apr 24 23:25:43 JST 2022 Welcome to Taskick!
waiting 5 seconds...
INFO:taskick:Executing: remove_files_in_input_folder

You can now launch an application that converts PNG images to PDF.

When a PNG image is saved in the input folder, a converted PDF file is output in the output folder. Files in the input folder are automatically deleted at startup or every minute.

png2gif

The application consists of welcome.yaml and main.yaml, and Taskick reads the two files indirectly by loading batch.yaml. For details of the configuration files, see the project page.

Release files for taskick 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for taskick 0.1.6
File Size Uploaded
taskick-0.1.6.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for taskick 0.1.6
File Interpreter ABI Platform
taskick-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 19.8 kB

Release files / taskick-0.1.6.tar.gz

Download URL taskick-0.1.6.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e90b45be64fe16aaa6f1613fcccc24472a15dd6ea9adb4f590a907197294a368
BLAKE2b-256 checksum
How to use checksums
e9add2abd7bf95206d8f93196f8aec6f90024c98e736617abb5da2f639a42f32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Linux/5.13.0-1021-azure

Release files / taskick-0.1.6-py3-none-any.whl

Download URL taskick-0.1.6-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19c2be10d5d4e6daf8e6896719361d3ef30bbd3c75e97ee29de03f62380b6d2d
BLAKE2b-256 checksum
How to use checksums
d8d6d17ab6f9dc89688bed47e441d759f16ec0d51656b29e8b9a79692f580b66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Linux/5.13.0-1021-azure
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page