{"id":46658868,"url":"https://github.com/nandyalu/quiv","last_synced_at":"2026-04-09T07:01:30.106Z","repository":{"id":342964224,"uuid":"1174129572","full_name":"nandyalu/quiv","owner":"nandyalu","description":"quiv is a lightweight background task scheduler for Python applications.","archived":false,"fork":false,"pushed_at":"2026-03-08T07:48:22.000Z","size":252,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-08T12:17:32.448Z","etag":null,"topics":["async","background-jobs","python","scheduler","stoppable","tasks"],"latest_commit_sha":null,"homepage":"https://nandyalu.github.io/quiv/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nandyalu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-06T05:14:25.000Z","updated_at":"2026-03-08T07:48:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nandyalu/quiv","commit_stats":null,"previous_names":["nandyalu/quiv"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nandyalu/quiv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandyalu%2Fquiv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandyalu%2Fquiv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandyalu%2Fquiv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandyalu%2Fquiv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nandyalu","download_url":"https://codeload.github.com/nandyalu/quiv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandyalu%2Fquiv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30278263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","background-jobs","python","scheduler","stoppable","tasks"],"created_at":"2026-03-08T09:01:46.572Z","updated_at":"2026-03-11T06:04:01.310Z","avatar_url":"https://github.com/nandyalu.png","language":"Python","funding_links":[],"categories":["python"],"sub_categories":[],"readme":"# \r\n\r\n![quiv Logo](https://raw.githubusercontent.com/nandyalu/quiv/main/assets/quiv-logo-text-full-minified.png)\r\n\r\n\u003chr\u003e\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003ca href=\"https://www.python.org/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/python-3.10|3.11|3.12|3.13|3.14-3670A0?style=flat\u0026logo=python\" alt=\"Python\"\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://github.com/psf/black\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" alt=\"Code style: black\"\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://github.com/nandyalu/quiv?tab=MIT-1-ov-file\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"License: MIT\"\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://pypi.org/project/quiv/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/pypi/dm/quiv\" alt=\"PyPI Pulls\"\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003ca href=\"https://github.com/nandyalu/quiv/actions/workflows/build.yml\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/nandyalu/quiv/actions/workflows/build.yml/badge.svg\" alt=\"Build\"\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://github.com/nandyalu/quiv/actions/workflows/tests.yml\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/nandyalu/quiv/actions/workflows/tests.yml/badge.svg\" alt=\"Tests\"\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://github.com/nandyalu/quiv/actions/workflows/typecheck.yml\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/nandyalu/quiv/actions/workflows/typecheck.yml/badge.svg\" alt=\"Type Check\"\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://github.com/nandyalu/quiv/issues\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/nandyalu/quiv?logo=github\" alt=\"GitHub Issues\"\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://github.com/nandyalu/quiv/commits/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/github/last-commit/nandyalu/quiv?logo=github\" alt=\"GitHub last commit\"\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n`quiv` is a lightweight background task scheduler for Python applications.\r\n\r\nIt is designed to work especially well with FastAPI apps that need predictable,\r\nin-process background task orchestration.\r\n\r\nSupports Python 3.10 through 3.14.\r\n\r\nIt provides:\r\n\r\n- threadpool-backed execution\r\n- support for sync and async task handlers\r\n- cooperative cancellation (`_stop_event`)\r\n- progress callbacks routed to your main async loop (`_progress_hook`)\r\n- persistent task/job state via SQLModel + SQLite\r\n\r\n## When to use quiv\r\n\r\nUse `quiv` when you need in-process background scheduling for app-level jobs,\r\nfor example:\r\n\r\n- polling APIs every N seconds\r\n- periodic cleanup tasks\r\n- one-shot delayed jobs\r\n- progress-aware long-running workloads\r\n\r\n## Install\r\n\r\n```bash\r\nuv add quiv\r\n# or\r\npip install quiv\r\n```\r\n\r\n## Quick start\r\n\r\n```python\r\nfrom contextlib import asynccontextmanager\r\n\r\nfrom fastapi import FastAPI\r\n\r\nfrom quiv import Quiv\r\n\r\nscheduler = Quiv(timezone=\"UTC\")\r\n\r\n\r\ndef ping(_progress_hook=None):\r\n    for i in range(30):\r\n        # do some work\r\n        if _progress_hook:\r\n            _progress_hook(message=\"ping\", progress=i, total=30)\r\n\r\n\r\nasync def on_progress(**payload):\r\n    # Replace with websocket broadcast, logging, metrics, etc.\r\n    print(\"progress\", payload)\r\n\r\n\r\n@asynccontextmanager\r\nasync def lifespan(app: FastAPI):\r\n    # Startup\r\n    scheduler.start()\r\n    yield\r\n    # Shutdown\r\n    scheduler.shutdown()\r\n\r\n\r\napp = FastAPI(lifespan=lifespan)\r\n\r\n@app.post(\"/start-heartbeat\")\r\ndef start_heartbeat():\r\n    scheduler.add_task(\r\n        task_name=\"heartbeat\",\r\n        func=ping,\r\n        interval=30,\r\n        progress_callback=on_progress,\r\n    )\r\n    return {\"message\": \"Heartbeat started successfully!\"}\r\n```\r\n\r\n## Documentation\r\n\r\nFull documentation is available at\r\n**[nandyalu.github.io/quiv](https://nandyalu.github.io/quiv/)**.\r\n\r\n- [Getting Started](https://nandyalu.github.io/quiv/getting-started/)\r\n- [Bigger Applications](https://nandyalu.github.io/quiv/bigger-applications/)\r\n- [API Reference](https://nandyalu.github.io/quiv/api/)\r\n- [Architecture](https://nandyalu.github.io/quiv/architecture/)\r\n- [Progress Callbacks](https://nandyalu.github.io/quiv/progress-callbacks/)\r\n- [Cancellation](https://nandyalu.github.io/quiv/cancellation/)\r\n- [Exceptions](https://nandyalu.github.io/quiv/exceptions/)\r\n\r\n## License\r\n\r\nMIT\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnandyalu%2Fquiv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnandyalu%2Fquiv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnandyalu%2Fquiv/lists"}