Skip to content

Asyncz

Asyncz

🚀 The scheduler that simply works. 🚀

Test Suite Package version Supported Python versions


Documentation: https://asyncz.dymmond.com 📚

Source Code: https://github.com/dymmond/asyncz


Asyncz is an async-first scheduler for Python applications and ASGI services. It keeps the familiar scheduler / trigger / store / executor model, but it is built around asyncio, explicit task objects, framework lifecycle integration, and predictable standard-library logging.

Why Asyncz

  • AsyncIOScheduler for regular async applications.
  • NativeAsyncIOScheduler for environments that already own the event loop.
  • Built-in triggers for one-off work, recurring intervals, cron expressions, combinations, and shutdown hooks.
  • Multiple persistence options for local development and production deployments.
  • CLI and dashboard tooling for operational workflows.

Install

pip install asyncz

Optional extras:

pip install "asyncz[dashboard]"
pip install "asyncz[localtime]"

Quick start

import logging

from asyncz.schedulers import AsyncIOScheduler

logging.basicConfig(level=logging.INFO)

scheduler = AsyncIOScheduler()


def cleanup() -> None:
    logging.getLogger(__name__).info("cleanup finished")


scheduler.add_task(cleanup, "interval", minutes=5, id="cleanup-task")
scheduler.start()

Logging

Asyncz uses Python's built-in logging module. The default logger namespaces are:

  • asyncz.schedulers
  • asyncz.executors.<alias>
  • asyncz.stores.<alias>

If you need custom logger creation, pass a custom loggers_class when constructing the scheduler.

Persistence and encryption

The default store is memory. For durable scheduling, Asyncz also ships with file, mongodb, redis, and sqlalchemy stores.

Persistent stores support ASYNCZ_STORE_ENCRYPTION_KEY. When it is set, serialized task payloads are encrypted before they are written to the backing store.