Procrastinate: PostgreSQL-based Task Queue for Python
Procrastinate is an open-source Python 3.7+ distributed task processing library, leveraging PostgreSQL to store task definitions, manage locks and dispatch tasks. It can be used within both sync and async code.
In other words, from your main code, you call specific functions (tasks) in a special way and instead of being run on the spot, they’re scheduled to be run elsewhere, now or in the future.
Source: Procrastinate: PostgreSQL-based Task Queue for Python.