Skip to main content

Helps to manage your tasks

Project description

🐢 LuckyTask

LuckyTask is a CLI tool to manage tasks with a Redis backend. It allows you to add, list, delete, update tasks, and configure Redis connection settings.

Features

  • Add a new task
  • List all tasks
  • Get tasks by specific priority
  • Get tasks by priority range
  • Delete a task by ID
  • Update a task by ID
  • Configure Redis connection settings

Installation

You can install the package using Poetry:

poetry install

Usage

After installing, you can use the luckytask command to manage your tasks.

Add a Task

To add a new task:

luckytask add-task "Task 4" 8 "Sample description"

🐢 Task added: id='a4099d38-c92f-4d2c-9254-e3b6ba520726' name='Task 4' priority=8 description='Sample description' timestamp=1719274988.0359566

List All Tasks

To list all tasks:

luckytask list-tasks

🐢 id='8e4d55a4-019a-4900-9099-458eca956d5a' name='Task 2' priority=1 description='Sample description' timestamp=1719275722.1838574

🐢 id='70688bb5-c8d9-4df7-bca9-99f1390e4d44' name='Task 3' priority=1 description='Sample description' timestamp=1719275727.4264348

🐢 id='b59ed13a-7660-441b-ace6-d5caa61bbb37' name='Task 1' priority=3 description='Sample description' timestamp=1719275714.860256

🐢 id='cc77f464-dcb5-4536-a2c9-6b10d85fbef5' name='Task 5' priority=5 description='Sample description' timestamp=1719275737.764184

🐢 id='776baa27-802d-4d66-af6c-57f08f3670da' name='Task 4' priority=8 description='Sample description' timestamp=1719275706.1597753

🐢 id='f3b7da5f-4d3b-4dc1-9f43-68b1aef7988b' name='Task 6' priority=10 description='Sample description' timestamp=1719275745.6112974

Get Tasks by Specific Priority

To get tasks by specific priority:

luckytask get-by-priority 1

🐢 id='8e4d55a4-019a-4900-9099-458eca956d5a' name='Task 2' priority=1 description='Sample description' timestamp=1719275722.1838574

🐢 id='70688bb5-c8d9-4df7-bca9-99f1390e4d44' name='Task 3' priority=1 description='Sample description' timestamp=1719275727.4264348

Get Tasks by Priority Range

To get tasks within a priority range:

luckytask get-by-priority-range 2 5

🐢 id='b59ed13a-7660-441b-ace6-d5caa61bbb37' name='Task 1' priority=3 description='Sample description' timestamp=1719275714.860256

🐢 id='cc77f464-dcb5-4536-a2c9-6b10d85fbef5' name='Task 5' priority=5 description='Sample description' timestamp=1719275737.764184

Delete a Task

To delete a task by ID:

luckytask delete-task <task_id>

🐢 Task cc77f464-dcb5-4536-a2c9-6b10d85fbef5 deleted.

Update a Task

To update a task by ID:

luckytask update-task b59ed13a-7660-441b-ace6-d5caa61bbb37 --name "Updated Task" --priority 3 --description "Updated description"

🐢 Task updated: id='b59ed13a-7660-441b-ace6-d5caa61bbb37' name='Updated Task' priority=3 description='Updated description' timestamp=1719275714.860256

Configure Redis

To configure Redis connection settings:

luckytask config-redis --host 127.0.0.1 --port 6379 --db 1

Using Docker

You can also run LuckyTask using Docker. Below are the steps to build and run the Docker container.

Docker Image

  1. Build the Docker Image Build the Docker Image

    docker build -t luckytask .
    
  2. Run the Docker Container:

    docker run -it luckytask <command> <arguments>
    

    For example, to add a task:

    docker run -it luckytask add-task "Task 1" 5 "Sample description"
    

Docker Compose

Alternatively, you can use Docker Compose.

  1. Build and Run the Container:

    docker-compose up --build -d
    
  2. Run Commands Inside the Container:

    docker-compose run luckytask luckytask <command> <arguments>
    

    For example, to list all tasks:

    docker-compose run luckytask luckytask list-tasks
    

    🐢 id='8e4d55a4-019a-4900-9099-458eca956d5a' name='Task 2' priority=1 description='Sample description' timestamp=1719275722.1838574

    🐢 id='70688bb5-c8d9-4df7-bca9-99f1390e4d44' name='Task 3' priority=1 description='Sample description' timestamp=1719275727.4264348

    🐢 id='b59ed13a-7660-441b-ace6-d5caa61bbb37' name='Updated Task' priority=3 description='Updated description' timestamp=1719275714.860256

    🐢 id='776baa27-802d-4d66-af6c-57f08f3670da' name='Task 4' priority=8 description='Sample description' timestamp=1719275706.1597753

    🐢 id='f3b7da5f-4d3b-4dc1-9f43-68b1aef7988b' name='Task 6' priority=10 description='Sample description' timestamp=1719275745.6112974

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

luckytask-0.1.0.tar.gz (32.1 kB view details)

Uploaded Source

Built Distribution

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

luckytask-0.1.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file luckytask-0.1.0.tar.gz.

File metadata

  • Download URL: luckytask-0.1.0.tar.gz
  • Upload date:
  • Size: 32.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.7 Linux/5.15.0-79-generic

File hashes

Hashes for luckytask-0.1.0.tar.gz
Algorithm Hash digest
SHA256 20d7192f130da09b327161f7dc15ce1384a642fba6c90bec21007c69913524bb
MD5 48a79ae70b6cd4a6ef08491ffed9b869
BLAKE2b-256 9dd21005d3cffb5bc1f32ab61bee9ce066d32f722db12b8a9c7bf25633f3a895

See more details on using hashes here.

File details

Details for the file luckytask-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: luckytask-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.7 Linux/5.15.0-79-generic

File hashes

Hashes for luckytask-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 961f54e53228565bcab595eed9a68b7753250c630424def664fb844184d22711
MD5 7c7e877b78527f4de09b93fca91ff459
BLAKE2b-256 9a057486dde6a763f8461f01cea9a47977abfa07522739501be5b0db7c409235

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