Metadata-Version: 2.1
Name: regta
Version: 0.2.0
Summary: Lightweight framework for executing periodic async and sync jobs in python
Home-page: https://github.com/SKY-ALIN/regta
License: MIT
Keywords: periodic,regular,async,jobs,sync,tasks,cron
Author: Vladimir Alinsky
Author-email: Vladimir@Alinsky.tech
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Framework :: AsyncIO
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: Jinja2 (>=3.0.3,<4.0.0)
Requires-Dist: asyncio (>=3.4.3,<4.0.0)
Requires-Dist: click (>=8.0.3,<9.0.0)
Project-URL: Repository, https://github.com/SKY-ALIN/regta
Description-Content-Type: text/markdown

# regta
**Lightweight framework to create and execute periodic async and sync jobs on 
different processes, threads and event loop.**

[![pypi](https://img.shields.io/pypi/v/regta.svg)](https://pypi.python.org/pypi/regta)
[![versions](https://img.shields.io/pypi/pyversions/regta.svg)](https://github.com/SKY-ALIN/regta)
[![license](https://img.shields.io/github/license/SKY-ALIN/regta.svg)](https://github.com/SKY-ALIN/regta/blob/main/LICENSE)

### Core Features

- **Different Jobs** - Create async, thread-based or process-based jobs 
  depending on your goals.


- **Support different code styles** - Create OOP styled or functional styled 
  jobs. Regta also provide interface to reuse user's already written code.


- **CLI interface to work with jobs** - Regta provide CLI tool to list and 
  start available written jobs.


- **Logging** - Redefine standard and define your own logging way.

---

### Installation
Install using `pip install regta` or `poetry add regta`. 
You can check if **regta** was installed correctly with the following 
command `regta --help`.

### Example
To write async job use `@regta.async_job()` decorator
```python
# jobs/some_async_job.py

from datetime import timedelta
import regta

@regta.async_job(interval=timedelta(seconds=5))
async def my_basic_job():
    return "Hello world! This is just a log message."
```
See more about different jobs types 
[here](https://regta.alinsky.tech/user_guide/make_jobs).

### Start Up
To start jobs use `regta run` command:
```shell
$ regta run
> [1] jobs were found.
> jobs.some_async_job:my_basic_job - Hello world! This is just a log message.
.  .  .
```
See CLI reference [here](https://regta.alinsky.tech/cli_reference).

---

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

