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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jobify-0.5.1.tar.gz.
File metadata
- Download URL: jobify-0.5.1.tar.gz
- Upload date:
- Size: 29.1 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0b4e9348aadc556f2e61a42aff0179612a59e0c5e1264cfe46e199981d61ad9
|
|
| MD5 |
f6e37268a629fd908bbd888cc9d5c9c2
|
|
| BLAKE2b-256 |
e8ad3157beaaf5a49831fc98bbf47946d68bde19cab0e28039e2324a97ee1f12
|
File details
Details for the file jobify-0.5.1-py3-none-any.whl.
File metadata
- Download URL: jobify-0.5.1-py3-none-any.whl
- Upload date:
- Size: 44.5 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71e1062afbfb96796ce7c8f042ac28116dd196957fdc95f423184400517feb43
|
|
| MD5 |
787911120be740309cc99a38bb9485ac
|
|
| BLAKE2b-256 |
ffe0d631a770739a6d6b5e175c4ab6179980150348f8d6218e5418e71039c32c
|