tasker-python


Nametasker-python JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/zigai/tasker
SummaryFunction/CLI tasks with scheduling and notifications
upload_time2023-05-03 17:25:46
maintainer
docs_urlNone
authorŽiga Ivanšek
requires_python
licenseMIT
keywords tasker python task scheduler scheduler notifications cron notifications
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Tasker
[![PyPI version](https://badge.fury.io/py/tasker-python.svg)](https://badge.fury.io/py/tasker-python)
![Supported versions](https://img.shields.io/badge/python-3.10+-blue.svg)
[![Downloads](https://static.pepy.tech/badge/tasker-python)](https://pepy.tech/project/tasker-python)
[![license](https://img.shields.io/github/license/zigai/tasker.svg)](https://github.com/zigai/tasker/blob/main/LICENSE)

Encapsulate function calls and shell commands as tasks with scheduling (powered by [Rocketry](https://github.com/Miksus/rocketry)) and notifications (powered by [Apprise](https://github.com/caronc/apprise)).

# Installation
#### From PyPi
```
pip install tasker-python
```
#### From source
```
pip install git+https://github.com/zigai/tasker.git
```
# Example
```python
from tasker import Channel, CommandLineTask

discord_webhook = "discord://..."

task = CommandLineTask(
    name="hello-world",
    command="echo 'Hello World!'",
    notification_channels=[
        Channel(discord_webhook, events=["start", "success", "info", "fail"]), 
    ],
    stdout=True, # display stdout in notifications
)

task.exec() # run once

from tasker.scheduler import TaskScheduler, every
scheduler = TaskScheduler()
scheduler.schedule_task(task, every("10 seconds")) # run every 10 seconds
scheduler.run()

```

# License
[MIT License](https://github.com/zigai/tasker/blob/master/LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zigai/tasker",
    "name": "tasker-python",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "tasker,python,task scheduler,scheduler notifications,cron notifications",
    "author": "\u017diga Ivan\u0161ek",
    "author_email": "ziga.ivansek@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2f/6a/b1d7511b39dfc056c7f1871a7eeaa7cb2b76802be8c561b980261f095e9c/tasker-python-0.1.0.tar.gz",
    "platform": null,
    "description": "# Tasker\n[![PyPI version](https://badge.fury.io/py/tasker-python.svg)](https://badge.fury.io/py/tasker-python)\n![Supported versions](https://img.shields.io/badge/python-3.10+-blue.svg)\n[![Downloads](https://static.pepy.tech/badge/tasker-python)](https://pepy.tech/project/tasker-python)\n[![license](https://img.shields.io/github/license/zigai/tasker.svg)](https://github.com/zigai/tasker/blob/main/LICENSE)\n\nEncapsulate function calls and shell commands as tasks with scheduling (powered by [Rocketry](https://github.com/Miksus/rocketry)) and notifications (powered by [Apprise](https://github.com/caronc/apprise)).\n\n# Installation\n#### From PyPi\n```\npip install tasker-python\n```\n#### From source\n```\npip install git+https://github.com/zigai/tasker.git\n```\n# Example\n```python\nfrom tasker import Channel, CommandLineTask\n\ndiscord_webhook = \"discord://...\"\n\ntask = CommandLineTask(\n    name=\"hello-world\",\n    command=\"echo 'Hello World!'\",\n    notification_channels=[\n        Channel(discord_webhook, events=[\"start\", \"success\", \"info\", \"fail\"]), \n    ],\n    stdout=True, # display stdout in notifications\n)\n\ntask.exec() # run once\n\nfrom tasker.scheduler import TaskScheduler, every\nscheduler = TaskScheduler()\nscheduler.schedule_task(task, every(\"10 seconds\")) # run every 10 seconds\nscheduler.run()\n\n```\n\n# License\n[MIT License](https://github.com/zigai/tasker/blob/master/LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Function/CLI tasks with scheduling and notifications",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/zigai/tasker"
    },
    "split_keywords": [
        "tasker",
        "python",
        "task scheduler",
        "scheduler notifications",
        "cron notifications"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4805dbf831db5cef63e14a6a9247fb90124e9a4836484c3f717ad095e1874932",
                "md5": "c4052fdef583de8138838a300ea08a0d",
                "sha256": "fe2c92b5a053803fec988f80ee1e6a5343a0b005906e26571fbe107fe268aa53"
            },
            "downloads": -1,
            "filename": "tasker_python-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c4052fdef583de8138838a300ea08a0d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 8699,
            "upload_time": "2023-05-03T17:25:43",
            "upload_time_iso_8601": "2023-05-03T17:25:43.511910Z",
            "url": "https://files.pythonhosted.org/packages/48/05/dbf831db5cef63e14a6a9247fb90124e9a4836484c3f717ad095e1874932/tasker_python-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2f6ab1d7511b39dfc056c7f1871a7eeaa7cb2b76802be8c561b980261f095e9c",
                "md5": "e981cd8724fd6f28900cdf6efb29e57c",
                "sha256": "6f542e08f6b5a908dda67b192ea8b0f1bb30072063bc8fcd01cd07c2801f6120"
            },
            "downloads": -1,
            "filename": "tasker-python-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e981cd8724fd6f28900cdf6efb29e57c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7543,
            "upload_time": "2023-05-03T17:25:46",
            "upload_time_iso_8601": "2023-05-03T17:25:46.898114Z",
            "url": "https://files.pythonhosted.org/packages/2f/6a/b1d7511b39dfc056c7f1871a7eeaa7cb2b76802be8c561b980261f095e9c/tasker-python-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-03 17:25:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zigai",
    "github_project": "tasker",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "tasker-python"
}
        
Elapsed time: 0.06589s