Skip to main content

A modern, lightweight and robust task manager with a user-friendly interface and a wide range of features, using the low-level asyncio API and more.

Project description

Jobify
Robust task scheduler.

Tests Coverage Package version Supported Python versions
CodeQL Dependency Review License: MIT


Documentation: https://theseriff.github.io/jobify/

Jobify is a robust solution that was built from the ground up to handle asynchronous tasks. It offers a clean and modern API that is inspired by leading frameworks.

Key features

  • Routing: There are routers like in fastAPI/Starlette/Aiogram.
  • Schedule: For cron, add two extra optional fields, * * * * * * *, for the second interval.
  • Lifespan: The lifespan of the application is similar to that of FastAPI/Starlette.
  • Middleware: Middleware such as fastAPI/Starlette/Aiogram.
  • Exception Handling: Exception handling using fastAPI/Starlette.

Quick Start

Install Jobify from PyPI:

pip install jobify

Here is a simple example of how to schedule and run a job:

import asyncio
from datetime import datetime, timezone
from zoneinfo import ZoneInfo

from jobify import Jobify


UTC = ZoneInfo("UTC")
# 1. Initialize Jobify
app = Jobify(tz=UTC)


@app.task(cron="* * * * * * *")  # Runs every seconds
async def my_cron() -> None:
    print("Hello! cron running every seconds")


@app.task
def my_job(name: str) -> None:
    now = datetime.now(tz=UTC)
    print(f"Hello, {name}! job running at: {now!r}")


async def main() -> None:
    # 4. Run the Jobify application context
    async with app:
        run_next_day = datetime.now(tz=UTC) + timedelta(days=1)
        job_at = await my_job.schedule("Connor").at(run_next_day)
        job_delay = await my_job.schedule("Sara").delay(20)

        await job_at.wait()
        await job_delay.wait()

        # Or
        # It is blocked indefinitely because the cron has infinite planning.
        # await app.wait_all()


if __name__ == "__main__":
    asyncio.run(main())

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

jobify-0.3.0.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jobify-0.3.0-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file jobify-0.3.0.tar.gz.

File metadata

  • Download URL: jobify-0.3.0.tar.gz
  • Upload date:
  • Size: 27.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for jobify-0.3.0.tar.gz
Algorithm Hash digest
SHA256 1f24a0ce87d8a34e6fa13070364180e4490b4e26a4c5c6c8b9ce1e5a8c555eef
MD5 55b15e068dcc14493e94b5f264c9fc2d
BLAKE2b-256 44f80c5d32fc2a706b11cf7afd0c18ad3ea304c49920ff4011b562056ab928e6

See more details on using hashes here.

File details

Details for the file jobify-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: jobify-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 42.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for jobify-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9112ffca1e9aadfb8e7d346fbe58e86e4a151fc7c60308702e1ae16eb9f40e00
MD5 193ae396370f463e06ff9c5c02e825ee
BLAKE2b-256 3cc0d19eba3e1632ffeb24d2ef1f7a2ec19328162d0bdfe7a3c2cc6b77a34352

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page