{"id":20441777,"url":"https://github.com/lightricks/freeze","last_synced_at":"2025-10-13T12:35:20.435Z","repository":{"id":42656823,"uuid":"466977573","full_name":"Lightricks/freeze","owner":"Lightricks","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-29T17:23:30.000Z","size":11,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-09-25T13:44:14.417Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Lightricks.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-03-07T06:54:21.000Z","updated_at":"2024-02-21T10:27:44.000Z","dependencies_parsed_at":"2022-08-29T19:21:48.396Z","dependency_job_id":null,"html_url":"https://github.com/Lightricks/freeze","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lightricks/freeze","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lightricks%2Ffreeze","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lightricks%2Ffreeze/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lightricks%2Ffreeze/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lightricks%2Ffreeze/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lightricks","download_url":"https://codeload.github.com/Lightricks/freeze/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lightricks%2Ffreeze/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015056,"owners_count":26085643,"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-10-13T02:00:06.723Z","response_time":61,"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":[],"created_at":"2024-11-15T09:34:44.304Z","updated_at":"2025-10-13T12:35:20.417Z","avatar_url":"https://github.com/Lightricks.png","language":"Python","readme":"# Freeze\n\n\nFreeze introduces 3 frozen collections: `FDict`, `FSet` and `FList`.\nThey are **immutable**, **hashable**, support **type-hinting**, and will attempt to recursively convert mutable \ncollections into frozen counterparts on initialization.\n\n### Motivation \nWhile there are built-in immutable versions for **list** (**tuple**) and **set** (**frozenset**), \nthey have some issues:\n- **tuple** can store mutable objects so its immutability is not guaranteed.\n- **frozenset** can't be initialized with mutable objects.\n- **dict** doesn't have a built-in immutable version at all.\n\n### Installation\n```shell\npip install frz \n```\n\n### Usage\n```python\nfrom freeze import FDict, FList, FSet\n\na_mutable_dict = {\n    \"list\": [1, 2],\n    \"set\": {3, 4},\n}\n\na_frozen_dict = FDict(a_mutable_dict)\n\nprint(repr(a_frozen_dict)) # FDict: {'list': FList: (1, 2), 'set': FSet: {3, 4}}\n```\n\n### How Freeze Works\nFreezing a collection is achieved by following the following logic recursively:\n- Immutable objects (except for collections) stay the same.\n- **Mapping** (e.g. **dict**) frozen with **FDict**.\n- **Sequence** (e.g. **list** or **tuple**) frozen as **FList**s.\n- **AbstractSet** (e.g. **set**) frozen as **FSet**s.\n- If any value in the collection can't be frozen, an exception is raised.\n\n### Known Issues:\n- Type hints are only accurate as long as no data conversion was performed.\n\n### Future Plans:\n- support for thawing frozen collections.\n- support for freezing more mutable types.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightricks%2Ffreeze","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightricks%2Ffreeze","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightricks%2Ffreeze/lists"}