Rocketry

The engine to power your Python apps

Test Test coverage Package version Supported Python versions


No time to read? Get started then.

Rocketry is a modern scheduling framework for Python applications. It is simple, clean and extensive.

Key features:

  • Simple: productive and easy to set up

  • Clean: Scheduling is just plain English

  • Robust: Well tested and production ready

  • Extensive: Has a lot of built-in features

  • Customizable: Designed to be modified

Core functionalities:

  • Powerful scheduling syntax

  • A lot of built-in scheduling options (including cron)

  • Task parallelization

  • Task parametrization

  • Task pipelining

  • Modifiable session also in runtime

  • Async support

It looks like this:

from rocketry import Rocketry

app = Rocketry()

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

if __name__ == "__main__":
    app.run()
Dislike the syntax?

You can also use the condition API instead of the string syntax:

from rocketry import Rocketry
from rocketry.conds import daily

app = Rocketry()

@app.task(daily)
def do_things():
    ...

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

Why Rocketry?#

There are some alternatives for a scheduler:

  • Crontab

  • APScheduler

  • Airflow

Compared to alternatives, Rocketry is highly productive and easy to use. It also has perhaps the most advanced mechanism for scheduling and creating custom rules to run tasks.

Rocketry is the automation backend that sets your applications alive. It has customization built into it and it is possible to build really complex systems that are can self update, self restart and interact with users.

Here is a demonstration of more advanced case:

from rocketry import Rocketry
from rocketry.args import Return, Arg, FuncArg

app = Rocketry()

@app.cond('is foo')
def is_foo():
    "This is a custom condition"
    ...
    return True


@app.task('daily & is foo', execution="process")
def do_daily():
    "This task runs once a day and runs on separate process"
    ...
    return ...

@app.task("after task 'do_daily'")
def do_after(arg1=Return('do_daily')):
    """This task runs after 'do_daily' and it has its the 
    return argument as an input"""
    ...


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

Interested?#

Just install the library:

pip install rocketry

There is much more to offer. See quick start and get started with tutorials. There are also handbooks to check options and details.

Indices and tables#