{"id":21067136,"url":"https://github.com/idf/pover","last_synced_at":"2025-08-07T09:04:02.943Z","repository":{"id":57454346,"uuid":"161732913","full_name":"idf/pover","owner":"idf","description":" Python OVERloading (pover) methods with type hints","archived":false,"fork":false,"pushed_at":"2018-12-14T07:16:28.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-17T19:17:43.779Z","etag":null,"topics":["overload","overloaded-functions","overloading","python3","typehints"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idf.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":"2018-12-14T04:49:02.000Z","updated_at":"2023-03-10T09:41:20.000Z","dependencies_parsed_at":"2022-09-05T05:40:30.834Z","dependency_job_id":null,"html_url":"https://github.com/idf/pover","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/idf/pover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idf%2Fpover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idf%2Fpover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idf%2Fpover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idf%2Fpover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idf","download_url":"https://codeload.github.com/idf/pover/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idf%2Fpover/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269229115,"owners_count":24381900,"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","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"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":["overload","overloaded-functions","overloading","python3","typehints"],"created_at":"2024-11-19T18:04:31.509Z","updated_at":"2025-08-07T09:04:02.895Z","avatar_url":"https://github.com/idf.png","language":"Python","readme":"# pover\nPython OVERloading (pover) methods with type hints\n\nIt is equipped with fast overloading methods look up, minimal runtime footprint, overloading methods at class construction time.\n\n## Install\n```\npip3 install pover\n```\n\n## Example\nAll you need is `pover.OverloadMeta`. Simply declare your class with metaclass `pover.OverloadMeta`\n\n```py\n#!/usr/bin/env python3\nimport unittest\nimport pover\n\n\nclass Foo(metaclass=pover.OverloadMeta):\n    def add(self, a: int):\n        return a + 1\n\n    def add(self, a: list):\n        return a + [1]\n\n    def add(self, a: set):\n        a.add(1)\n        return a\n\n    def minus(self, a: int):\n        return a - 1\n\n    def minus(self, a: str):\n        return a[:-1]\n\n\nclass OverloadTest(unittest.TestCase):\n    def test_overload(self):\n        foo = Foo()\n        self.assertEqual(foo.add(1), 2)\n        self.assertEqual(foo.add([0]), [0, 1])\n        self.assertEqual(foo.add({0}), {0, 1})\n        self.assertEqual(foo.minus(1), 0)\n        self.assertEqual(foo.minus(\"hello\"), \"hell\")\n```\n\n## Run tests:\n```\npython3 -m unittest pover.tests.tests\n```\n\n\n## Supports\nIt requires python \u003e=3.5.\n\nIt supports all native python types like `int`, `set`, `list`, `dict` etc. as well as your custom classes `class MyClass`.\n\nIt does not support `typing` module like `typing.List`, `typing.Tuple`, but you can use the native `list`, `tuple` instead.\n\n## Future\nSupport keyword arguments.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidf%2Fpover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidf%2Fpover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidf%2Fpover/lists"}