{"id":13936923,"url":"https://github.com/Aluriak/graffunc","last_synced_at":"2025-07-19T22:33:13.596Z","repository":{"id":57435721,"uuid":"53659637","full_name":"Aluriak/graffunc","owner":"Aluriak","description":"Python 3 data structure -- (hyper)graph of function","archived":false,"fork":false,"pushed_at":"2017-11-08T22:36:12.000Z","size":59,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-18T19:05:06.669Z","etag":null,"topics":["data-structures","graph","hypergraph","python"],"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/Aluriak.png","metadata":{"files":{"readme":"README.mkd","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":"2016-03-11T10:33:13.000Z","updated_at":"2024-06-13T12:48:11.000Z","dependencies_parsed_at":"2022-09-01T22:20:51.122Z","dependency_job_id":null,"html_url":"https://github.com/Aluriak/graffunc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2Fgraffunc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2Fgraffunc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2Fgraffunc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2Fgraffunc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aluriak","download_url":"https://codeload.github.com/Aluriak/graffunc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226693903,"owners_count":17667757,"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":["data-structures","graph","hypergraph","python"],"created_at":"2024-08-07T23:03:07.307Z","updated_at":"2024-11-27T05:30:41.081Z","avatar_url":"https://github.com/Aluriak.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Graffunc -- The graph of function data structure\nPython package allowing manipulation of data by graph pathfinding.\n\n## usage example\n(see more in [tests](graffunc/test/) and [examples](examples/))\n\n    from graffunc import graffunc, InconvertibleError\n\n\n    def my_a_to_b_converter(a):\n        b = a.upper()\n        return {'b': b}\n    def my_b_to_c_converter(b):\n        c = 'payload: ' + b + '/payload'\n        return {'c': c}\n    def my_a_to_c_converter(a):\n        raise InconvertibleError()\n\n\n    # creation of the main object\n    grfc = graffunc({\n        ('a',): {('b',): my_a_to_b_converter},\n    })\n    # dynamic modification of the object\n    grfc.add(my_b_to_c_converter, sources={'b'}, targets={'c'})\n    grfc.add(my_a_to_c_converter, sources={'a'}, targets={'c'})\n\n\n    assert {'a', 'b', 'c'} == grfc.reachables_types(sources={'a'})\n    assert {'b', 'c'} == grfc.reachables_types(sources={'b'})\n    assert {'c'} == grfc.reachables_types(sources={'c'})\n\n    assert {'b': 'HELLO'} == grfc.convert(sources={'a': 'hello'}, targets={'b'})\n    assert {'c': 'payload: HELLO/payload'} == grfc.convert(sources={'a': 'hello'}, targets={'c'})\n\n\n## installation\n\n    pip install graffunc\n\n\n## links\n[github](http://github.com/aluriak/graffunc) and [pypi](http://pypi.python.org/pypi/graffunc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAluriak%2Fgraffunc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAluriak%2Fgraffunc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAluriak%2Fgraffunc/lists"}