Skip to main content

regta

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

versions Code Quality PyPI version license

Core Features

  • Various Job Types - Create async, thread-based, or process-based jobs depending on your goals.

  • Flexible Intervals - Use standard timedelta or specially designed Period for highly responsible jobs.

  • Multi-Paradigm - Design OOP styled or functional styled jobs.

  • CLI Interface - Regta provides a CLI tool to start, list and create jobs by template.

  • Professional 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


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.

# 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.

Start Up

To start jobs use regta run command:

$ 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.


Full documentation and reference are available on regta.alinsky.tech

Metadata

Release files for regta 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for regta 0.3.0
File Size Uploaded
regta-0.3.0.tar.gz 13.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for regta 0.3.0
File Interpreter ABI Platform
regta-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.4 kB

Release files / regta-0.3.0.tar.gz

Download URL regta-0.3.0.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d887a27723378f7922b7d8e3b8cf2c0fa1a38f3423a0f6dece31ab6d51431b1c
BLAKE2b-256 checksum
How to use checksums
a1819c2720c6301507be966d25022aa7a6de6be6ec4d0dbef322a0ec618f21b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.7.9 Darwin/22.2.0

Release files / regta-0.3.0-py3-none-any.whl

Download URL regta-0.3.0-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89305991cb139b375ba2f90ff30a686015bdeffcdd11569750f187b4447dafb8
BLAKE2b-256 checksum
How to use checksums
1babad82e704e8b8c66263ddf9383ef0c186495c956745852451051366fe7ba5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.7.9 Darwin/22.2.0

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page