{"id":28764937,"url":"https://github.com/klen/muffin-donald","last_synced_at":"2026-02-27T05:34:34.089Z","repository":{"id":57443851,"uuid":"371711185","full_name":"klen/muffin-donald","owner":"klen","description":"Tasks manager for muffin","archived":false,"fork":false,"pushed_at":"2025-07-15T11:14:11.000Z","size":235,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-09-25T06:59:15.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/klen.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":".github/code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/codeowners","security":".github/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-05-28T13:33:25.000Z","updated_at":"2025-07-15T11:14:15.000Z","dependencies_parsed_at":"2025-07-11T12:08:42.408Z","dependency_job_id":"fcbd6828-a010-4667-9dc9-f17ebb33a55c","html_url":"https://github.com/klen/muffin-donald","commit_stats":null,"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/klen/muffin-donald","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin-donald","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin-donald/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin-donald/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin-donald/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klen","download_url":"https://codeload.github.com/klen/muffin-donald/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin-donald/sbom","scorecard":{"id":563337,"data":{"date":"2025-08-11","repo":{"name":"github.com/klen/muffin-donald","commit":"3fe0bea010d8c75b13bd53251782075c924bb279"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Security-Policy","score":9,"reason":"security policy file detected","details":["Info: security policy file detected: .github/security.md:1","Info: Found linked content: .github/security.md:1","Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy","Info: Found text in security policy: .github/security.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":9,"reason":"11 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/klen/muffin-donald/release.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/klen/muffin-donald/tests.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/klen/muffin-donald/tests.yml/develop?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'develop'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T14:16:40.559Z","repository_id":57443851,"created_at":"2025-08-20T14:16:40.559Z","updated_at":"2025-08-20T14:16:40.559Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29885854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"online","status_checked_at":"2026-02-27T02:00:06.759Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-06-17T10:13:01.845Z","updated_at":"2026-02-27T05:34:34.082Z","avatar_url":"https://github.com/klen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Muffin-Donald\n#############\n\n**Muffin-Donald** is a plugin for the Muffin_ framework that provides support\nfor asynchronous background tasks, workers, and scheduling.\n\n.. image:: https://github.com/klen/muffin-donald/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-donald/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-donald\n    :target: https://pypi.org/project/muffin-donald/\n    :alt: PYPI Version\n\n.. image:: https://img.shields.io/pypi/pyversions/muffin-donald\n    :target: https://pypi.org/project/muffin-donald/\n    :alt: Python Versions\n\nContents\n========\n\n.. contents::\n\nFeatures\n========\n\n- ✅ Register async tasks\n- ✅ Run background workers\n- ✅ Schedule periodic tasks (cron or intervals)\n- ✅ RPC-style submit and wait for result\n- ✅ Muffin plugin integration with lifecycle management\n\nRequirements\n============\n\n- python \u003e= 3.10\n- muffin \u003e= 0.60.0\n- donald \u003e= 0.1.0\n\nInstallation\n============\n\nInstall via pip::\n\n    pip install muffin-donald\n\nUsage\n=====\n\nInitialize the plugin:\n\n.. code-block:: python\n\n    import muffin\n    from muffin_donald import Plugin\n\n    app = muffin.Application(\"example\")\n\n    tasks = Plugin(app, backend=\"redis\", backend_params={\n        \"url\": \"redis://localhost:6379/0\"\n    }, start_worker=True, start_scheduler=True)\n\nRegister a task:\n\n.. code-block:: python\n\n    @tasks.task()\n    async def my_task(x, y):\n        return x + y\n\nSubmit task for background execution:\n\n.. code-block:: python\n\n    my_task.submit(1, 2)\n\nSubmit and wait for result (RPC style):\n\n.. code-block:: python\n\n    result = await my_task.submit_and_wait(1, 2)\n    print(\"Result:\", result)  # Result: 3\n\nSchedule a periodic task:\n\n.. code-block:: python\n\n    @tasks.task()\n    async def periodic_task():\n        print(\"Periodic task executed\")\n\n    periodic_task.schedule(\"*/5 * * * *\")  # every 5 minutes\n\nHandle task errors with on_error:\n\n.. code-block:: python\n\n    @tasks.on_error\n    async def handle_error(exc):\n        print(\"Task error:\", exc)\n\nLifecycle hooks:\n\n.. code-block:: python\n\n    @tasks.on_start\n    async def startup():\n        print(\"Tasks manager started\")\n\n    @tasks.on_stop\n    async def shutdown():\n        print(\"Tasks manager stopped\")\n\nHealthcheck command:\n\nMuffin-Donald provides a CLI command for health checks::\n\n    muffin \u003capp\u003e tasks-healthcheck\n\n- Returns exit code 0 if healthy\n- Returns exit code 1 if unhealthy\n\nCommands\n========\n\n+-------------------+-----------------------------+\n| Command           | Description                 |\n+===================+=============================+\n| tasks-worker      | Run the worker process      |\n+-------------------+-----------------------------+\n| tasks-scheduler   | Run the scheduler           |\n+-------------------+-----------------------------+\n| tasks-healthcheck | Check manager health        |\n+-------------------+-----------------------------+\n\nConfiguration Options\n=====================\n\nYou can configure the plugin via parameters or Muffin settings (with ``TASKS_`` prefix):\n\n+------------------+-----------+-------------------------------------+\n| Name             | Default   | Description                         |\n+==================+===========+=====================================+\n| log_level        | INFO      | Logger level                        |\n+------------------+-----------+-------------------------------------+\n| log_config       | None      | Logger config                       |\n+------------------+-----------+-------------------------------------+\n| backend          | memory    | Backend: memory, redis, amqp        |\n+------------------+-----------+-------------------------------------+\n| backend_params   | {}        | Backend connection params           |\n+------------------+-----------+-------------------------------------+\n| worker_params    | {}        | Worker params                       |\n+------------------+-----------+-------------------------------------+\n| start_worker     | False     | Auto start a worker on startup      |\n+------------------+-----------+-------------------------------------+\n| start_scheduler  | False     | Auto start a scheduler on startup   |\n+------------------+-----------+-------------------------------------+\n\nExample in Muffin settings:\n\n.. code-block:: python\n\n    TASKS_BACKEND = \"redis\"\n    TASKS_BACKEND_PARAMS = {\"url\": \"redis://localhost:6379/0\"}\n    TASKS_START_WORKER = True\n    TASKS_START_SCHEDULER = True\n\nTesting\n=======\n\nExample using ``manage_lifespan``:\n\n.. code-block:: python\n\n    import pytest\n    from asgi_tools.tests import manage_lifespan\n\n    async def test_tasks(app, tasks):\n        async with manage_lifespan(app):\n            result = await my_task.submit_and_wait(1, 2)\n            assert result == 3\n\nBug Tracker\n===========\n\nPlease report issues or suggestions at https://github.com/klen/muffin-donald/issues\n\nContributing\n============\n\nDevelopment happens at: https://github.com/klen/muffin-donald\n\nContributors\n============\n\n- klen_ (Kirill Klenov)\n\nLicense\n=======\n\nLicensed under the MIT license.\n\n.. _klen: https://github.com/klen\n.. _Muffin: https://github.com/klen/muffin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklen%2Fmuffin-donald","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklen%2Fmuffin-donald","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklen%2Fmuffin-donald/lists"}