{"id":23922564,"url":"https://github.com/fcrozetta/moirai","last_synced_at":"2026-03-17T23:06:56.033Z","repository":{"id":261784852,"uuid":"883326714","full_name":"fcrozetta/moirai","owner":"fcrozetta","description":"moirai engine","archived":false,"fork":false,"pushed_at":"2025-05-22T15:16:42.000Z","size":305,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-31T10:55:18.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/fcrozetta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-11-04T19:13:18.000Z","updated_at":"2024-12-23T16:46:44.000Z","dependencies_parsed_at":"2024-12-18T15:29:07.462Z","dependency_job_id":"87287fb9-583a-4d44-855c-a415974d13aa","html_url":"https://github.com/fcrozetta/moirai","commit_stats":null,"previous_names":["fcrozetta/moirai"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fcrozetta/moirai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcrozetta%2Fmoirai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcrozetta%2Fmoirai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcrozetta%2Fmoirai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcrozetta%2Fmoirai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fcrozetta","download_url":"https://codeload.github.com/fcrozetta/moirai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcrozetta%2Fmoirai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30635156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T22:38:22.569Z","status":"ssl_error","status_checked_at":"2026-03-17T22:38:11.804Z","response_time":56,"last_error":"SSL_read: 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":[],"created_at":"2025-01-05T17:14:58.652Z","updated_at":"2026-03-17T23:06:56.014Z","avatar_url":"https://github.com/fcrozetta.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# moirai-engine\n\n[![PyPI - Version](https://img.shields.io/pypi/v/moirai-engine.svg)](https://pypi.org/project/moirai-engine)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/moirai-engine.svg)](https://pypi.org/project/moirai-engine)\n\n-----\n\n## Table of Contents\n\u003c!-- TOC --\u003e\n\n- [moirai-engine](#moirai-engine)\n  - [Table of Contents](#table-of-contents)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [Basic Example](#basic-example)\n    - [Advanced Example](#advanced-example)\n  - [About](#about)\n  - [License](#license)\n\n\u003c!-- /TOC --\u003e\n\n\n\u003e **NOTE:** This doc is still in progress. for now it was generated by AI (sorry).\n\n## Installation\n\n```console\npip install moirai-engine\n```\n\n## Usage\n\n### Basic Example\n\nHere is a basic example of how to use the `moirai-engine` library to create and run a simple job:\n\n```python\nimport time\nfrom moirai_engine.core.engine import Engine\nfrom moirai_engine.utils.samples import hello_world\n\n# Create and start the engine\nengine = Engine()\nengine.start()\n\n# Create a job using the hello_world sample\njob = hello_world()\n\n# Add the job to the engine\nengine.add_job(job)\n\n# Let the engine run for a while\ntime.sleep(5)\n\n# Stop the engine\nengine.stop()\n```\n\n### Advanced Example\n\nHere is an advanced example that includes real-time notifications and job cancellation:\n\n```python\nimport asyncio\nfrom moirai_engine.core.engine import Engine\nfrom moirai_engine.utils.samples import hello_world\n\n\n# Create an async function\nasync def notification_listener(notification):\n    print(f\"Received notification: {notification}\")\n\n\nasync def main():\n    engine = Engine(max_workers=4, listener=notification_listener)\n    await engine.start()\n\n    # Add jobs to the engine\n    await engine.add_job(hello_world(), notification_listener)\n\n    # Let the engine run for a while\n    await asyncio.sleep(2)\n\n    await engine.stop()\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n\n```\n\n## About\n\n`moirai-engine` is the engine that powers [Ananke](https://github.com/fcrozetta/ananke), but it was planned to be used as a processing engine. This project is still in progress, and features like task registry and autodiscover are still in development.\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcrozetta%2Fmoirai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffcrozetta%2Fmoirai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcrozetta%2Fmoirai/lists"}