{"id":34553397,"url":"https://github.com/fastai/fastdispatch","last_synced_at":"2026-04-18T21:35:11.383Z","repository":{"id":42675632,"uuid":"509909825","full_name":"fastai/fastdispatch","owner":"fastai","description":"Wrapper for plum dispatch to make it more compatible with fastcore's typedispatch","archived":false,"fork":false,"pushed_at":"2022-07-17T12:08:35.000Z","size":310,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-11T09:07:41.235Z","etag":null,"topics":["fastai","functional-programming","multiple-dispatch","plum","python"],"latest_commit_sha":null,"homepage":"https://fastai.github.io/fastdispatch/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fastai.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}},"created_at":"2022-07-03T03:06:50.000Z","updated_at":"2023-06-05T17:47:20.000Z","dependencies_parsed_at":"2022-07-09T06:00:29.050Z","dependency_job_id":null,"html_url":"https://github.com/fastai/fastdispatch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fastai/fastdispatch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastai%2Ffastdispatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastai%2Ffastdispatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastai%2Ffastdispatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastai%2Ffastdispatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastai","download_url":"https://codeload.github.com/fastai/fastdispatch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastai%2Ffastdispatch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31986323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"ssl_error","status_checked_at":"2026-04-18T20:23:29.375Z","response_time":103,"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":["fastai","functional-programming","multiple-dispatch","plum","python"],"created_at":"2025-12-24T08:18:29.767Z","updated_at":"2026-04-18T21:35:11.368Z","avatar_url":"https://github.com/fastai.png","language":"Jupyter Notebook","readme":"\n# fastdispatch\n\n\u003c!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! --\u003e\n\n[![CI](https://github.com/fastai/fastdispatch/actions/workflows/test.yaml/badge.svg)](https://github.com/fastai/fastdispatch/actions/workflows/test.yaml)\n[![Deploy to GitHub\nPages](https://github.com/fastai/fastdispatch/actions/workflows/deploy.yaml/badge.svg)](https://github.com/fastai/fastdispatch/actions/workflows/deploy.yaml)\n\nWrapper for plum dispatch to make it more compatible with fastcore’s\ntypedispatch. Hopefully this is just temporary, and instead the\nfunctionality here will be moved into plum.\n\n## Install\n\n`pip install fastdispatch`\n\n## How to use\n\n`fastdispatch` works just like plum, with a few extensions. We recommend\nreading through their [very informative\ndocs](https://github.com/wesselb/plum), however, here’s a quick example\nto get started:\n\n``` python\nfrom fastcore.test import test_fail\nfrom fastdispatch import *\n```\n\nDecorate type annotated Python functions with `fastdispatch.dispatch` to\nadd them as *methods* to a dispatched *function* (following [Julia’s\nterminology](https://docs.julialang.org/en/v1/manual/methods/)):\n\n``` python\n@dispatch\ndef f(x: str): return \"This is a string!\"\n\n@dispatch\ndef f(x: int): return \"This is an integer!\"\n```\n\n``` python\nf('1')\n```\n\n    'This is a string!'\n\n``` python\nf(1)\n```\n\n    'This is an integer!'\n\nIf there’s no matching method, `plum.NotFoundLookupError` is raised:\n\n``` python\ntest_fail(lambda: f(1.0), contains='For function \"f\", signature Signature(builtins.float) could not be resolved.')\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastai%2Ffastdispatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastai%2Ffastdispatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastai%2Ffastdispatch/lists"}