Skip to main content

Lightweight framework for executing periodic async and sync jobs in python

Project description

regta

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

pypi versions 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

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

Start Up

To start jobs use regta run command:

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


Full documentation and reference is available at regta.alinsky.tech

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

regta-0.2.0.tar.gz (11.7 kB view hashes)

Uploaded Source

Built Distribution

regta-0.2.0-py3-none-any.whl (14.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page