Skip to main content

Advanced scheduling framework

Project description

Red Engine

Powering your Python Apps


Pypi version build codecov Documentation Status PyPI pyversions

What is it?

Rocketry is a modern scheduling framework for Python applications. It is simple, clean and extensive. It is the engine that sets your Python programs alive.

The library is minimal on the surface but extensive and customizable underneath. The syntax very clean:

from rocketry import Rocketry

app = Rocketry()

@app.task('daily')
def do_daily():
    ...

if __name__ == '__main__':
    app.run()

Compared to alternatives, Rocketry has perhaps the most elegant syntax and is the most productive. It offers more features than Crontab or APScheduler but is much easier to work with than Airflow. It does not make assumptions of your project.

Read more from the documentations: Rocketry, documentations

Installation

Install Rocketry from PyPI:

pip install rocketry

More Examples?

Scheduling:

@app.task("every 10 seconds")
def do_continuously():
    ...

@app.task("daily after 07:00")
def do_daily_after_seven():
    ...

@app.task("hourly & time of day between 22:00 and 06:00")
def do_hourly_at_night():
    ...

@app.task("(weekly on Monday | weekly on Saturday) & time of day after 10:00")
def do_twice_a_week_after_ten():
    ...

Pipelining tasks:

from rocketry.args import Return

@app.task("daily after 07:00")
def do_first():
    ...
    return 'Hello World'

@app.task("after task 'do_first'")
def do_second(arg=Return('do_first')):
    # arg contains the value of the task do_first's return
    ...
    return 'Hello Python'

Parallelizing tasks:

@app.task("daily", execution="main")
def do_unparallel():
    ...

@app.task("daily", execution="thread")
def do_on_separate_thread():
    ...

@app.task("daily", execution="process")
def do_on_separate_process():
    ...

Author

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

rocketry-2.0.1.tar.gz (127.2 kB view hashes)

Uploaded Source

Built Distribution

rocketry-2.0.1-py3-none-any.whl (160.9 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