Skip to main content

aion

Async job scheduling for Python, powered by Rust’s Tokio runtime.

aion lets you schedule and run asynchronous jobs in Python with Rust-level performance. It bridges Python’s asyncio world with Rust’s high-performance Tokio runtime — giving you a faster, safer way to execute async tasks, periodic jobs, and cron-like schedules.

✨ Features

  • 🚀 Powered by Rust Tokio — concurrency with minimal overhead
  • 🧩 Python async compatible — runs within existing asyncio loops
  • ⏰ Job scheduling — supports delayed, periodic, and cron-style scheduling
  • 🔄 Thread-safe — Rust-backed atomic control and synchronization
  • 🧠 Lightweight — no background daemon or external broker required

📦 Installation

Install directly from PyPI (once published):

pip install aion

Or, build from source using Maturin:

git clone gitlab@gitlab.balaenaquant.com:balaenaquant/core/aion.git
cd aion
uvx maturin develop

🧠 Quick Start

Here’s a simple example showing how to schedule async jobs using aion.

import asyncio
from datetime import timedelta
from aion import Scheduler, Trigger

async def hello():
    print("Hello from Aion!")

async def main():
    scheduler = Scheduler()

    # Run every 1 second
    await scheduler.schedule(handler=hello, trigger=Trigger.Interval(timedelta(seconds=1)))

    # Run immediately
    await hello()

    # Keep the scheduler running
    await scheduler.start()

asyncio.run(main())

Cron expressions

You can also schedule jobs using cron-like syntax:

import asyncio
from aion import Scheduler, Trigger

async def report():
    print("Generating report...")

async def main():
    scheduler = Scheduler()
    await scheduler.schedule(handler=report, trigger=Trigger.Cron("0 * * * *"))  # Run every hour
    await scheduler.start()

asyncio.run(main())

⚙️ API Overview

Function / Class Description
Scheduler Core job scheduler managing async task lifetimes.
Scheduler.schedule Puts an async function onto the scheduler.
Scheduler.start Starts the scheduler, this will block forever.
Scheduler.pause Pause a scheduled job, can be resumed.
Scheduler.resume Resumes a paused job, no effect if job is not paused.
Scheduler.shutdown Shutdown the scheduler, all scheduled jobs will also exit.
Trigger Represents a method of invoking a job.

🧪 Testing

aion uses pytest and pytest-asyncio.

Run all tests:

uv run pytest -v

🛠️ Developer Guide

To rebuild the Python extension:

uv sync --reinstall # rebuild the rust lib and loads it into venv

To check the Rust code:

cargo check
cargo test

To format code:

cargo fmt
ruff check . --fix

Directory structure

aion/
├── src/              # Rust sources
├── aion/             # Python module
├── examples/         # Usage examples
├── tests/            # Python tests
├── Cargo.toml        # Rust dependencies
└── pyproject.toml    # Python packaging

📄 License

Copyright © 2025 Balaena Quant

All rights reserved. This is a proprietary and confidential work. Unauthorized use, duplication, or distribution is prohibited.

🌌 Why “Aion”?

In ancient Greek, Aion represents eternal time — the endless flow that powers all things. This library brings that concept to async programming: efficient, perpetual scheduling powered by Rust.

Metadata

Release files for bq-aion-rs 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for bq-aion-rs 0.1.0
File
bq_aion_rs-0.1.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
bq_aion_rs-0.1.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details
bq_aion_rs-0.1.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ ARM64 Details
bq_aion_rs-0.1.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.14 CPython 3.14 macOS 10.12+ x86-64, macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64) Details
bq_aion_rs-0.1.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
bq_aion_rs-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
bq_aion_rs-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ ARM64 Details
bq_aion_rs-0.1.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 Details
bq_aion_rs-0.1.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
bq_aion_rs-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
bq_aion_rs-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details
bq_aion_rs-0.1.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.12 CPython 3.12 macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64 Details

Total release size: 7.3 MB

Release files / bq_aion_rs-0.1.0-cp314-cp314-win_amd64.whl

Download URL bq_aion_rs-0.1.0-cp314-cp314-win_amd64.whl
Size 397.3 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
7d8a30b80277dc286968e51a936bcd9149ac01c06db422e631432d64d42e7cb2
BLAKE2b-256 checksum
How to use checksums
271227bd61eae7c3704ed529b07454efce418fc7a496d21a03a6ea2d1c2ec97e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / bq_aion_rs-0.1.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL bq_aion_rs-0.1.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 497.1 kB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
9535e1ec48461630d3e7f40c83c40ec5bb69f26b2a52facefab94fd8d65a4d14
BLAKE2b-256 checksum
How to use checksums
1b9d0021ba30b8458f0ecc819de76a4d62a967f4f74979139877bd9a3df632ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / bq_aion_rs-0.1.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL bq_aion_rs-0.1.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 487.2 kB
Tags CPython 3.14 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
691b077ebc722584545d25f62471868cc2ae60a469a3a381aa974193da3ff86a
BLAKE2b-256 checksum
How to use checksums
8754bd372633643ce15dc09fd56309969fb0f9f89d2a5df73e696547f01a2d23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / bq_aion_rs-0.1.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL bq_aion_rs-0.1.0-cp314-cp314-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 1.0 MB
Tags CPython 3.14 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4bccde19716aef29ed2d02790bb110f2e8aa9cc447559be138fb35413d649b7b
BLAKE2b-256 checksum
How to use checksums
1840749cb1fccc5b04ac5677d8e5d8c5082604ea5109c013e369f65d62f3c9ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / bq_aion_rs-0.1.0-cp313-cp313-win_amd64.whl

Download URL bq_aion_rs-0.1.0-cp313-cp313-win_amd64.whl
Size 396.4 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
7c58c47cfe0cf303f4f66214c44eb25c7e80ef9b7c664986d039a54b63008362
BLAKE2b-256 checksum
How to use checksums
7968e2165b4219b5480c3c482eb631a2be128f0cd6126f4cf63d2f25d9ed63aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / bq_aion_rs-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL bq_aion_rs-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 497.5 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c98b12c07e7203a39fe70cd1eab2671872871798462a1b4f31b0f518e78c0033
BLAKE2b-256 checksum
How to use checksums
54a9eb65310a2ea53617ad15ddf08265972bfe104e1782ba06387e23bff1d998
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / bq_aion_rs-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL bq_aion_rs-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 486.3 kB
Tags CPython 3.13 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
22f8c7c38f6719d46f41c341f4b7a8c041f2d42c9975427d7aa9aaaa38ab4c07
BLAKE2b-256 checksum
How to use checksums
aa4c51b9dff63b0b13620a311e19e5b720dc3831e5e0fe66b2b99ca377ae83b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / bq_aion_rs-0.1.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL bq_aion_rs-0.1.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 1.0 MB
Tags CPython 3.13 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a127d2583784ea1a3a4ee582add7e094606425037c645c956663c2de9418e3f9
BLAKE2b-256 checksum
How to use checksums
2159a73f2969a0cb80b5d71703ac7950122ca54e118f9a59abab4e0885145fb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / bq_aion_rs-0.1.0-cp312-cp312-win_amd64.whl

Download URL bq_aion_rs-0.1.0-cp312-cp312-win_amd64.whl
Size 396.6 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
efc0bd259a3b76ed6ab6c65cc83fb43b1ac5ca00239b739dc5ce90008d4e84a3
BLAKE2b-256 checksum
How to use checksums
652aa08741c9063c2f5228790f2a5fb195e3476f194858fd9e8fcd79635d1db2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / bq_aion_rs-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL bq_aion_rs-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 498.0 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
1d3e358707f180a8fa3a25f49f9a54e7c232eab91fab80b595a01c8728363d95
BLAKE2b-256 checksum
How to use checksums
67c3c8ed604be9915720d4f2d20fe50c1b5484d2500fabfded1926a31ba0f9f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / bq_aion_rs-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL bq_aion_rs-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 486.8 kB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
ded2436e72caca8161d67695981ebda3ecb90d605eb7d49df060497a6fb9d9cb
BLAKE2b-256 checksum
How to use checksums
3b52f5c8c2e127ae64bf4dfc690029b869e66e90e1d3946bd0e234a73f865736
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release files / bq_aion_rs-0.1.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL bq_aion_rs-0.1.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 1.0 MB
Tags CPython 3.12 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
35ce6387eebde033c552dd5bbe8b5b7a45497e72a6a3ead3b0244c7a0a1ea5c0
BLAKE2b-256 checksum
How to use checksums
4daf9913e286a3a27370f8cc8755504305f05bdbb93b39dd792c60a7d7b5a919
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.22

Release history Release notifications | RSS feed

This release

0.1.0 This release

12 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page