{"id":21213440,"url":"https://github.com/zhemao/funktown","last_synced_at":"2025-06-28T04:34:08.911Z","repository":{"id":2103592,"uuid":"3044888","full_name":"zhemao/funktown","owner":"zhemao","description":"Immutable Data Structures for Python","archived":false,"fork":false,"pushed_at":"2015-10-10T05:08:30.000Z","size":280,"stargazers_count":75,"open_issues_count":3,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-17T08:52:06.440Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/zhemao.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":"2011-12-24T14:15:14.000Z","updated_at":"2024-11-05T19:44:17.000Z","dependencies_parsed_at":"2022-09-19T08:10:30.483Z","dependency_job_id":null,"html_url":"https://github.com/zhemao/funktown","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhemao%2Ffunktown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhemao%2Ffunktown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhemao%2Ffunktown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhemao%2Ffunktown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhemao","download_url":"https://codeload.github.com/zhemao/funktown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225629628,"owners_count":17499295,"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":[],"created_at":"2024-11-20T21:16:16.676Z","updated_at":"2024-11-20T21:16:17.296Z","avatar_url":"https://github.com/zhemao.png","language":"Python","funding_links":[],"categories":["Awesome Functional Python"],"sub_categories":["Libraries"],"readme":"# FunkTown: Functional Data Structures for Python\n\nThis library implements an efficient ImmutableDict and ImmutableVector class \ninspired by the implementation of Vectors and Maps in the Clojure programming\nlanguage.\n\n## Installation\n\nIf you are installing from the cloned repository, just use\n\n\tpython setup.py install\n\nPackage is also available from PyPI. In that case, use\n\n\tpip install funktown\n\nArchLinux users can install from the AUR\n\n\tyaourt -S python2-funktown \n\tyaourt -S python-funktown # python 3 version\n\n## API\n\n### ImmutableVector\n\nThe constructor takes a list of initial values. It supports standard list\noperations such as item access, slicing, and concatenation.\n\n#### assoc(index, value)\n\nReturns a new vector with the value assigned to the given index\n\n#### conj(value)\n\nReturns a new vector with the value appended to the back. Roughly equivalent \nto vec.assoc(len(vec), value)\n\n#### pop()\n\nReturns a new vector with the final item removed.\n\n### ImmutableDict\n\nThe constructor can take a dict and/or keyword arguments. Item access follows\nthe same behavior as builtin python dicts.\n\n#### assoc(key, value)\n\nReturns a new immutable dict with the value associated with the given key.\n\n#### get(key)\n\nLike in Python's builtin dict, this will act like item access, except \nreturning None instead of raising a KeyError.\n\n#### remove(key)\n\nReturn a new ImmutableDict with the item at that key removed\n\n#### update(otherdict)\n\nReturn a new immutable dict updated with the records in otherdict.\n\n## Compatiblity \n\nFunktown has been tested with Python 2.7.2 and 3.2.2 on a Linux system.\nIt should be compatible with all python versions greater than 2.6.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhemao%2Ffunktown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhemao%2Ffunktown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhemao%2Ffunktown/lists"}