{"id":24194802,"url":"https://github.com/6r17/madframe","last_synced_at":"2025-03-03T07:22:27.723Z","repository":{"id":170136250,"uuid":"646188638","full_name":"6r17/madframe","owner":"6r17","description":"Customizable Asynchronous State-Machine","archived":false,"fork":false,"pushed_at":"2023-05-27T19:39:23.000Z","size":1122,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T20:46:15.532Z","etag":null,"topics":["asyncio","events","framework","functionnal","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/6r17.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-05-27T15:14:38.000Z","updated_at":"2023-05-30T09:01:46.000Z","dependencies_parsed_at":"2023-07-04T15:45:49.713Z","dependency_job_id":null,"html_url":"https://github.com/6r17/madframe","commit_stats":null,"previous_names":["6r17/madframe"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6r17%2Fmadframe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6r17%2Fmadframe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6r17%2Fmadframe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6r17%2Fmadframe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/6r17","download_url":"https://codeload.github.com/6r17/madframe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241623589,"owners_count":19992691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["asyncio","events","framework","functionnal","python3"],"created_at":"2025-01-13T18:39:36.887Z","updated_at":"2025-03-03T07:22:27.717Z","avatar_url":"https://github.com/6r17.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**madframe** - Functional State-Machine Framework for Python\n- ~💢 TypeCheck at runtime~ (coming soon !)\n- ☮️ Non intruisive\n- 🧰 Functionnal\n- 🕐 Event-Based\n\n:warning: This project is in Alpha state.\n\n## Includes\n\n### 🤖 Autofill\n\nAutofill is the process of automaticaly composing a function usage deduced from the prototype naming and a given context.\n\n```python\nfrom madframe.autofill import autofill\n\ncontext = {\"value\": \"foo\"}\ndef some_function(value):\n    print(value)\n\nawait autofill(some_function, args=[], context=context) # notice that we don't pass any argument\n\u003e \"foo\"\n# autofill undertand it has to retrieve the value from context if you don't specify it\n\nawait autofill(some_function, args[\"bar\"], context=context) # we pass an argument\n\u003e \"bar\"\n```\n💁 **every madframe decorator uses `autofill`**\n  \n### 🕙 Routine\n  \n```python\nfrom madframe.bindings import setup\n\n@setup\ndef initialize():\n    return {\"some_key\": \"foo\"}\n\n@routine(1)\ndef print_foo(some_key):\n    print(some_key) # -\u003e prints \"foo\"\n```\n\n### 🏗️ Setup\n\nSetup is used to define function to be ran at start-up. Those executions block the start-up and will abort the lauch if they fail.\n\n### 📝 Perpetuate\n\n`perpetuate` is `autofill` but the context is also updated with the result of the function (given it's a `dict`)\n\n### 🚩 Wire\n\n```python\nfrom madframe.bindings import wire\n\nsomething_is_done_when, do_something_when = wire()\n\nfetch = do_something_when(fetch_data)\nsomething_is_done_when(analyze_data)\n\nfetch # is equivalent of `analyze_data(fetch_data)`\n```\n\n[![Package test](https://github.com/6r17/madframe/actions/workflows/test.yml/badge.svg)](https://github.com/6r17/madframe/actions/workflows/test.yml)\n[![pypi](https://img.shields.io/pypi/v/madframe)](https://pypi.org/project/madframe/)\n![python: \u003e3.9](https://img.shields.io/badge/python-%3E3.9-informational)\n\n### Installation\n\n```bash\npip3 install madframe\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F6r17%2Fmadframe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F6r17%2Fmadframe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F6r17%2Fmadframe/lists"}