kettled


Namekettled JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryA simple, ligthweight and secure python scheduler for UNIX systems that does not depend on any third-party packages.
upload_time2024-11-05 10:19:57
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT
keywords scheduler schedule daemon datetime date time timedelta
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🫖 _kettled (kettle.d)_ 🫖
#### _A lightweight, efficient and secure scheduler._

[![repository](https://img.shields.io/badge/src-GitHub-8A2BE2)](https://github.com/solarvenom/kettled.py) [![mirror](https://img.shields.io/badge/mirror-GitLab-84e22c)](https://gitlab.com/open_source8171945/kettled.py) [![Build Status](https://img.shields.io/gitlab/pipeline-status/kettled.py)](https://github.com/solarvenom/kettled.py) [![release](https://img.shields.io/github/v/release/solarvenom/kettled.py)]() [![license](https://img.shields.io/badge/license-MIT-blue)](https://github.com/solarvenom/kettled.py/blob/main/LICENSE)

Kettled is a fast, efficient and secure daemon-based event scheduler for UNIX-systems that spawns an independent process which keeps track of your scheduled events with a nice CLI UI.

## Features
- ✨ Built with python built-in modules only. No third-party modules involved.
- ✨ An easy-to-use CLI UI to manage and monitor your scheduler daemon.
<p align="center">
    <img src="https://github.com/solarvenom/kettled.py/blob/main/docs/kettle.gif" width="450">
</p>

## Installation
`kettled` can be installed directly from the PyPI repositories with:

```bash
pip install kettled
```

## Example: *How to use kettled*

The following example shows how `Kettled` is instantiated and how basic `events` are scheduled.

```py
import datetime as dt

from kettled import Kettled

def foo():
    print("foo")

kettled = Kettled()
kettled.init()

event_datetime = dt.datetime.now() + dt.timedelta(hours=2)

kettled.add(event_name="readme_event", date_time=event_datetime, callback=foo)

kettled.update(event_name="readme_event", new_date_time=event_datetime + dt.timedelta(minutes=30))

kettled.delete(event_name="readme_event")
```

# CLI interface usage
To launch `kettled` from the terminal simply issue `kettled start`:
```text
user@pc$ kettled start 
🫖 kettled started.
```

Check daemon status via `kettled status`:
```text
user@pc$ kettled status
🫖 kettled has been up for 27 minutes and 56 seconds.
```

You can add events from the terminal by issueing `kettled add` and inputing the event data via prompts:
```text
user@pc$ kettled add
🫖 Please enter event name: readme_event
🫖 Please enter event scheduled date: 2024-11-05 10:17:57.587410
🫖 Please enter event callback: print('this is a callback function')
```

To update a scheduled event issue `kettled update` and go through the prompts to modify event data:
```text
user@pc$ kettled update
🫖 Please enter the name of event be modified: readme_event
🫖 Please enter the new event name or leave blank to leave unchanged: updated_readme_event
🫖 Please enter the new event schdeuled date or leave blank to leave unchanged: 
🫖 Please enter the new event callback or leave blank to leave unchanged: 
```

To check all scheduled events just issue `kettled list`:
```text
user@pc$ kettled list
user@pc$ 
_______________________________________________________
| Index |      Event Name      |    Scheduled Date    |
|-----------------------------------------------------|
|   1   | updated_readme_event | 2024-11-05T10:17:57  |
|_______|______________________|______________________|
```

Finally, to stop the kettled deamon simply issue `kettled stop`:
```text
user@pc$ kettled stop
🫖 kettled was terminated.
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "kettled",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "solarvenom <contact@solarvenom.com>",
    "keywords": "scheduler, schedule, daemon, datetime, date, time, timedelta",
    "author": null,
    "author_email": "solarvenom <contact@solarvenom.com>",
    "download_url": "https://files.pythonhosted.org/packages/2f/df/98bed6955dcfc17754694ea43c2b02108d0207e2e8aa00a48831bfceb74a/kettled-1.0.0.tar.gz",
    "platform": null,
    "description": "# \ud83e\uded6 _kettled (kettle.d)_ \ud83e\uded6\n#### _A lightweight, efficient and secure scheduler._\n\n[![repository](https://img.shields.io/badge/src-GitHub-8A2BE2)](https://github.com/solarvenom/kettled.py) [![mirror](https://img.shields.io/badge/mirror-GitLab-84e22c)](https://gitlab.com/open_source8171945/kettled.py) [![Build Status](https://img.shields.io/gitlab/pipeline-status/kettled.py)](https://github.com/solarvenom/kettled.py) [![release](https://img.shields.io/github/v/release/solarvenom/kettled.py)]() [![license](https://img.shields.io/badge/license-MIT-blue)](https://github.com/solarvenom/kettled.py/blob/main/LICENSE)\n\nKettled is a fast, efficient and secure daemon-based event scheduler for UNIX-systems that spawns an independent process which keeps track of your scheduled events with a nice CLI UI.\n\n## Features\n- \u2728 Built with python built-in modules only. No third-party modules involved.\n- \u2728 An easy-to-use CLI UI to manage and monitor your scheduler daemon.\n<p align=\"center\">\n    <img src=\"https://github.com/solarvenom/kettled.py/blob/main/docs/kettle.gif\" width=\"450\">\n</p>\n\n## Installation\n`kettled` can be installed directly from the PyPI repositories with:\n\n```bash\npip install kettled\n```\n\n## Example: *How to use kettled*\n\nThe following example shows how `Kettled` is instantiated and how basic `events` are scheduled.\n\n```py\nimport datetime as dt\n\nfrom kettled import Kettled\n\ndef foo():\n    print(\"foo\")\n\nkettled = Kettled()\nkettled.init()\n\nevent_datetime = dt.datetime.now() + dt.timedelta(hours=2)\n\nkettled.add(event_name=\"readme_event\", date_time=event_datetime, callback=foo)\n\nkettled.update(event_name=\"readme_event\", new_date_time=event_datetime + dt.timedelta(minutes=30))\n\nkettled.delete(event_name=\"readme_event\")\n```\n\n# CLI interface usage\nTo launch `kettled` from the terminal simply issue `kettled start`:\n```text\nuser@pc$ kettled start \n\ud83e\uded6 kettled started.\n```\n\nCheck daemon status via `kettled status`:\n```text\nuser@pc$ kettled status\n\ud83e\uded6 kettled has been up for 27 minutes and 56 seconds.\n```\n\nYou can add events from the terminal by issueing `kettled add` and inputing the event data via prompts:\n```text\nuser@pc$ kettled add\n\ud83e\uded6 Please enter event name: readme_event\n\ud83e\uded6 Please enter event scheduled date: 2024-11-05 10:17:57.587410\n\ud83e\uded6 Please enter event callback: print('this is a callback function')\n```\n\nTo update a scheduled event issue `kettled update` and go through the prompts to modify event data:\n```text\nuser@pc$ kettled update\n\ud83e\uded6 Please enter the name of event be modified: readme_event\n\ud83e\uded6 Please enter the new event name or leave blank to leave unchanged: updated_readme_event\n\ud83e\uded6 Please enter the new event schdeuled date or leave blank to leave unchanged: \n\ud83e\uded6 Please enter the new event callback or leave blank to leave unchanged: \n```\n\nTo check all scheduled events just issue `kettled list`:\n```text\nuser@pc$ kettled list\nuser@pc$ \n_______________________________________________________\n| Index |      Event Name      |    Scheduled Date    |\n|-----------------------------------------------------|\n|   1   | updated_readme_event | 2024-11-05T10:17:57  |\n|_______|______________________|______________________|\n```\n\nFinally, to stop the kettled deamon simply issue `kettled stop`:\n```text\nuser@pc$ kettled stop\n\ud83e\uded6 kettled was terminated.\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A simple, ligthweight and secure python scheduler for UNIX systems that does not depend on any third-party packages.",
    "version": "1.0.0",
    "project_urls": {
        "Changelog": "https://github.com/solarvenom/kettled.py/CHANGELOG.md",
        "Homepage": "https://github.com/solarvenom/kettled.py",
        "Issue Tracker": "https://github.com/solarvenom/kettled.py/issues"
    },
    "split_keywords": [
        "scheduler",
        " schedule",
        " daemon",
        " datetime",
        " date",
        " time",
        " timedelta"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "52a285c80f5af7443b9bc1abc97662eae1af9fe9299dd856c2a70198b849d5c8",
                "md5": "8ed7dd91658f8c492865e966a2dda769",
                "sha256": "2ed4327da91d823ebb9b72a788109ae696e1fc182c35a0c42235b0ea52048089"
            },
            "downloads": -1,
            "filename": "kettled-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8ed7dd91658f8c492865e966a2dda769",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 13099,
            "upload_time": "2024-11-05T10:19:56",
            "upload_time_iso_8601": "2024-11-05T10:19:56.372529Z",
            "url": "https://files.pythonhosted.org/packages/52/a2/85c80f5af7443b9bc1abc97662eae1af9fe9299dd856c2a70198b849d5c8/kettled-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2fdf98bed6955dcfc17754694ea43c2b02108d0207e2e8aa00a48831bfceb74a",
                "md5": "9f3f29f67c1317da14703a015cecb3a5",
                "sha256": "e13ba2906581e5450c2b020889461a1499f324e48f64b8c42b0cf6d252288864"
            },
            "downloads": -1,
            "filename": "kettled-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9f3f29f67c1317da14703a015cecb3a5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 10869,
            "upload_time": "2024-11-05T10:19:57",
            "upload_time_iso_8601": "2024-11-05T10:19:57.830364Z",
            "url": "https://files.pythonhosted.org/packages/2f/df/98bed6955dcfc17754694ea43c2b02108d0207e2e8aa00a48831bfceb74a/kettled-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-05 10:19:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "solarvenom",
    "github_project": "kettled.py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "kettled"
}
        
Elapsed time: 1.73562s