{"id":26336159,"url":"https://github.com/dobatymo/hat-trie-python","last_synced_at":"2025-03-16T01:16:58.663Z","repository":{"id":57436864,"uuid":"142951454","full_name":"Dobatymo/hat-trie-python","owner":"Dobatymo","description":"Python wrapper for https://github.com/Tessil/hat-trie","archived":false,"fork":false,"pushed_at":"2021-12-06T08:46:07.000Z","size":13,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T00:21:43.718Z","etag":null,"topics":["data-structures","hat-trie","python"],"latest_commit_sha":null,"homepage":"","language":"Cython","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/Dobatymo.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-07-31T02:24:13.000Z","updated_at":"2023-08-16T01:46:07.000Z","dependencies_parsed_at":"2022-09-10T05:40:24.405Z","dependency_job_id":null,"html_url":"https://github.com/Dobatymo/hat-trie-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dobatymo%2Fhat-trie-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dobatymo%2Fhat-trie-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dobatymo%2Fhat-trie-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dobatymo%2Fhat-trie-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dobatymo","download_url":"https://codeload.github.com/Dobatymo/hat-trie-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809870,"owners_count":20351407,"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","hat-trie","python"],"created_at":"2025-03-16T01:16:58.080Z","updated_at":"2025-03-16T01:16:58.656Z","avatar_url":"https://github.com/Dobatymo.png","language":"Cython","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hat-trie-python\n\nPython wrapper for https://github.com/Tessil/hat-trie (MIT License)\n\nIt's still incomplete, not all functionality is supported. Sets are not implemented yet.\nTested on Linux 2.7+, Windows 3.5+, MacOS 2.7+. It should work on Windows 2.7 also, however it's tricky to compile.\n\n## Install\n\n- `pip install hat-trie-python` (requires Cython and a C++11 compiler)\n\n## Example usage:\n```\nfrom hattrie import HatTrieMap\nhtm = HatTrieMap()\nhtm[b\"/foo\"] = b\"1\"\nhtm[b\"/foo/bar\"] = b\"2\"\nprint(list(htm.longest_prefix(b\"/foo\"))) # returns [(b'/foo', b'1')]\nprint(list(htm.longest_prefix(b\"/foo/baz\"))) # returns [(b'/foo', b'1')]\nprint(list(htm.longest_prefix(b\"/foo/bar/baz\"))) # returns [(b'/foo/bar', b'2'), (b'/foo', b'1')]\nprint(list(htm.longest_prefix(b\"/foo/bar/\"))) # returns [(b'/foo/bar', b'2'), (b'/foo', b'1')]\nprint(list(htm.longest_prefix(b\"/bar\"))) # returns []\nprint(list(htm.longest_prefix(b\"\"))) # returns []\n```\n\nAny Python object is supported as value, however only bytes are supported as keys.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdobatymo%2Fhat-trie-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdobatymo%2Fhat-trie-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdobatymo%2Fhat-trie-python/lists"}