regta


Nameregta JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://regta.alinsky.tech
SummaryProduction-ready scheduler with async, multithreading and multiprocessing support.
upload_time2023-01-26 21:44:53
maintainer
docs_urlNone
authorVladimir Alinsky
requires_python>=3.7.2,<4.0.0
licenseMIT
keywords scheduler multithreading multiprocessing async jobs tasks cron periodic regular
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # regta

**Production-ready scheduler with async, multithreading and multiprocessing support for Python.**

[![versions](https://img.shields.io/pypi/pyversions/regta.svg)](https://github.com/SKY-ALIN/regta)
![Code Quality](https://github.com/SKY-ALIN/regta/actions/workflows/code-quality.yml/badge.svg)
[![PyPI version](https://badge.fury.io/py/regta.svg)](https://pypi.org/project/regta/)
[![license](https://img.shields.io/github/license/SKY-ALIN/regta.svg)](https://github.com/SKY-ALIN/regta/blob/main/LICENSE)

### Core Features

- **[Various Job Types](https://regta.alinsky.tech/user_guide/make_jobs)** - Create async, thread-based,
  or process-based jobs depending on your goals.


- **[Flexible Intervals](https://regta.alinsky.tech/user_guide/interval_types)** - Use standard `timedelta`
  or specially designed `Period` for highly responsible jobs.


- **[Multi-Paradigm](https://regta.alinsky.tech/user_guide/oop_style)** - Design OOP styled
  or functional styled jobs.


- **[CLI Interface](https://regta.alinsky.tech/cli_reference)** - Regta provides a CLI tool
  to start, list and create jobs by template.


- **[Professional Logging](https://regta.alinsky.tech/user_guide/logging)** - Redefine standard logger
  and define your own. ANSI coloring is supported.

You may discover scheduling alternatives and find the comparison with Regta on 
[regta.alinsky.tech/alternatives](https://regta.alinsky.tech/alternatives)

---

### Installation
Install using `pip install regta` or `poetry add regta`.

If you use python < 3.9, then also install backports: `pip install "backports.zoneinfo[tzdata]"`.

You can check if Regta was installed correctly with the following command `regta --version`.

### Example

To write async job just use `@regta.async_job()` decorator.

```python
# jobs/my_jobs.py

from datetime import timedelta
from regta import async_job, Period


@async_job(Period().every(10).seconds)
async def my_period_based_job():
    return "1. Hello world! This is just a log message."


@async_job(timedelta(seconds=10))
async def my_timedelta_based_job():
    return "2. You may use `timedelta` or `Period` as interval."


@async_job(Period().on.sunday.at("18:35").by("Asia/Almaty"))
async def my_sunday_job():
    return "3. `Period` is recommended for highly responsible jobs because it does not accumulate shift."
```

Read more about various job types 
[here](https://regta.alinsky.tech/user_guide/make_jobs).

### Start Up

To start jobs use `regta run` command:

```shell
$ regta run
> [3] jobs were found.
> 2023-01-08 18:31:00,005 [jobs.my_jobs:my_period_based_job] [INFO] - 1. Hello world! This is just a log message.
> 2023-01-08 18:31:05,622 [jobs.my_jobs:my_timedelta_based_job] [INFO] - 2. You may use `timedelta` or `Period` as interval.
.  .  .
> 2023-01-08 18:34:50,002 [jobs.my_jobs:my_period_based_job] [INFO] - 1. Hello world! This is just a log message.
> 2023-01-08 18:34:55,689 [jobs.my_jobs:my_timedelta_based_job] [INFO] - 2. You may use `timedelta` or `Period` as interval.
> 2023-01-08 18:35:00,001 [jobs.my_jobs:my_sunday_job] [INFO] - 3. `Period` is recommended for highly responsible jobs because it does not accumulate shift.
.  .  .
```

Read CLI reference [here](https://regta.alinsky.tech/cli_reference).

---

Full documentation and reference are available on 
[regta.alinsky.tech](https://regta.alinsky.tech)

            

Raw data

            {
    "_id": null,
    "home_page": "https://regta.alinsky.tech",
    "name": "regta",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7.2,<4.0.0",
    "maintainer_email": "",
    "keywords": "scheduler,multithreading,multiprocessing,async,jobs,tasks,cron,periodic,regular",
    "author": "Vladimir Alinsky",
    "author_email": "Vladimir@Alinsky.tech",
    "download_url": "https://files.pythonhosted.org/packages/a1/81/9c2720c6301507be966d25022aa7a6de6be6ec4d0dbef322a0ec618f21b2/regta-0.3.0.tar.gz",
    "platform": null,
    "description": "# regta\n\n**Production-ready scheduler with async, multithreading and multiprocessing support for Python.**\n\n[![versions](https://img.shields.io/pypi/pyversions/regta.svg)](https://github.com/SKY-ALIN/regta)\n![Code Quality](https://github.com/SKY-ALIN/regta/actions/workflows/code-quality.yml/badge.svg)\n[![PyPI version](https://badge.fury.io/py/regta.svg)](https://pypi.org/project/regta/)\n[![license](https://img.shields.io/github/license/SKY-ALIN/regta.svg)](https://github.com/SKY-ALIN/regta/blob/main/LICENSE)\n\n### Core Features\n\n- **[Various Job Types](https://regta.alinsky.tech/user_guide/make_jobs)** - Create async, thread-based,\n  or process-based jobs depending on your goals.\n\n\n- **[Flexible Intervals](https://regta.alinsky.tech/user_guide/interval_types)** - Use standard `timedelta`\n  or specially designed `Period` for highly responsible jobs.\n\n\n- **[Multi-Paradigm](https://regta.alinsky.tech/user_guide/oop_style)** - Design OOP styled\n  or functional styled jobs.\n\n\n- **[CLI Interface](https://regta.alinsky.tech/cli_reference)** - Regta provides a CLI tool\n  to start, list and create jobs by template.\n\n\n- **[Professional Logging](https://regta.alinsky.tech/user_guide/logging)** - Redefine standard logger\n  and define your own. ANSI coloring is supported.\n\nYou may discover scheduling alternatives and find the comparison with Regta on \n[regta.alinsky.tech/alternatives](https://regta.alinsky.tech/alternatives)\n\n---\n\n### Installation\nInstall using `pip install regta` or `poetry add regta`.\n\nIf you use python < 3.9, then also install backports: `pip install \"backports.zoneinfo[tzdata]\"`.\n\nYou can check if Regta was installed correctly with the following command `regta --version`.\n\n### Example\n\nTo write async job just use `@regta.async_job()` decorator.\n\n```python\n# jobs/my_jobs.py\n\nfrom datetime import timedelta\nfrom regta import async_job, Period\n\n\n@async_job(Period().every(10).seconds)\nasync def my_period_based_job():\n    return \"1. Hello world! This is just a log message.\"\n\n\n@async_job(timedelta(seconds=10))\nasync def my_timedelta_based_job():\n    return \"2. You may use `timedelta` or `Period` as interval.\"\n\n\n@async_job(Period().on.sunday.at(\"18:35\").by(\"Asia/Almaty\"))\nasync def my_sunday_job():\n    return \"3. `Period` is recommended for highly responsible jobs because it does not accumulate shift.\"\n```\n\nRead more about various job types \n[here](https://regta.alinsky.tech/user_guide/make_jobs).\n\n### Start Up\n\nTo start jobs use `regta run` command:\n\n```shell\n$ regta run\n> [3] jobs were found.\n> 2023-01-08 18:31:00,005 [jobs.my_jobs:my_period_based_job] [INFO] - 1. Hello world! This is just a log message.\n> 2023-01-08 18:31:05,622 [jobs.my_jobs:my_timedelta_based_job] [INFO] - 2. You may use `timedelta` or `Period` as interval.\n.  .  .\n> 2023-01-08 18:34:50,002 [jobs.my_jobs:my_period_based_job] [INFO] - 1. Hello world! This is just a log message.\n> 2023-01-08 18:34:55,689 [jobs.my_jobs:my_timedelta_based_job] [INFO] - 2. You may use `timedelta` or `Period` as interval.\n> 2023-01-08 18:35:00,001 [jobs.my_jobs:my_sunday_job] [INFO] - 3. `Period` is recommended for highly responsible jobs because it does not accumulate shift.\n.  .  .\n```\n\nRead CLI reference [here](https://regta.alinsky.tech/cli_reference).\n\n---\n\nFull documentation and reference are available on \n[regta.alinsky.tech](https://regta.alinsky.tech)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Production-ready scheduler with async, multithreading and multiprocessing support.",
    "version": "0.3.0",
    "split_keywords": [
        "scheduler",
        "multithreading",
        "multiprocessing",
        "async",
        "jobs",
        "tasks",
        "cron",
        "periodic",
        "regular"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1babad82e704e8b8c66263ddf9383ef0c186495c956745852451051366fe7ba5",
                "md5": "70abe6f77d98169626378d8b77aeeeb5",
                "sha256": "89305991cb139b375ba2f90ff30a686015bdeffcdd11569750f187b4447dafb8"
            },
            "downloads": -1,
            "filename": "regta-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "70abe6f77d98169626378d8b77aeeeb5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.2,<4.0.0",
            "size": 15884,
            "upload_time": "2023-01-26T21:44:52",
            "upload_time_iso_8601": "2023-01-26T21:44:52.214335Z",
            "url": "https://files.pythonhosted.org/packages/1b/ab/ad82e704e8b8c66263ddf9383ef0c186495c956745852451051366fe7ba5/regta-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1819c2720c6301507be966d25022aa7a6de6be6ec4d0dbef322a0ec618f21b2",
                "md5": "2f394f1c3a582cc3c3d848f058b44da1",
                "sha256": "d887a27723378f7922b7d8e3b8cf2c0fa1a38f3423a0f6dece31ab6d51431b1c"
            },
            "downloads": -1,
            "filename": "regta-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2f394f1c3a582cc3c3d848f058b44da1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.2,<4.0.0",
            "size": 13491,
            "upload_time": "2023-01-26T21:44:53",
            "upload_time_iso_8601": "2023-01-26T21:44:53.940807Z",
            "url": "https://files.pythonhosted.org/packages/a1/81/9c2720c6301507be966d25022aa7a6de6be6ec4d0dbef322a0ec618f21b2/regta-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-26 21:44:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "regta"
}
        
Elapsed time: 0.20981s