{"id":19968403,"url":"https://github.com/zylo117/hyckle","last_synced_at":"2026-07-17T14:35:03.519Z","repository":{"id":62569896,"uuid":"193852345","full_name":"zylo117/Hyckle","owner":"zylo117","description":"A memory-friendly warpper of pickle with better compression.","archived":false,"fork":false,"pushed_at":"2020-07-02T02:33:00.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T10:18:03.162Z","etag":null,"topics":["data-serialization","local-io","pickle","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zylo117.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":"2019-06-26T07:27:45.000Z","updated_at":"2020-07-02T02:33:02.000Z","dependencies_parsed_at":"2022-11-03T16:45:13.386Z","dependency_job_id":null,"html_url":"https://github.com/zylo117/Hyckle","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/zylo117%2FHyckle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zylo117%2FHyckle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zylo117%2FHyckle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zylo117%2FHyckle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zylo117","download_url":"https://codeload.github.com/zylo117/Hyckle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241404210,"owners_count":19957650,"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-serialization","local-io","pickle","python"],"created_at":"2024-11-13T02:45:45.088Z","updated_at":"2025-10-24T01:11:06.246Z","avatar_url":"https://github.com/zylo117.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hyckle\n\n## Introduction\n\nHyckle is a high-level warpper of pickle that provides data serialization for \nall python-pickleable object with the support of local read \u0026 write (like H5), \nbetter compression (85% smaller than original pickle) \nand more memory-efficient. Also it's a drop-in replacement for python dict and list.\n\nHyckle是pickle的一个高层封装，可以为所有可pickle的python变量提供数据序列化，\n同时支持像H5一样的局部读写，拥有更好的压缩率（比原生pickle小了85%）,并更节省内存。\n同时，它可以用于直接替换python的字典和列表。\n\n---\n\n## Installation\n\n    pip install hyckle\n\n---\n## Demo\n\n### Basic Usage\n\n    # create or reload a hyckle file. \n    # This will create a new hyckle file if not exists or reload a existed hyckle file.\n    hk = Hyckle('helloworld.hyckle')\n    \n    # use hyckle as a dict\n    hk['test_0'] = any_pickleable_object_0\n    hk['test_1'] = any_pickleable_object_1\n    hk['test_2'] = any_pickleable_object_2\n    hk['test_3'] = any_pickleable_object_3\n    # or\n    hk.add('test_0', any_pickleable_object_0)\n    hk.add('test_1',any_pickleable_object_1)\n    hk.add('test_2',any_pickleable_object_2)\n    hk.add('test_3',any_pickleable_object_3)\n    \n    # use hyckle as a list\n    hk.append(any_pickleable_object_4)\n    hk.append(any_pickleable_object_5)\n    \n    # check the length of hyckle\n    length = len(hk)\n    \n    # use hyckle as a iterable object\n    for obj in hk:\n        do_something(obj)\n    \n    # get certain object by key: str\n    obj_0 = hk.get(key)\n    # or using getitem method\n    obj_1 = hk[key]\n    \n    # get certain object by index: int\n    obj_2 = hk[index]\n    \n    # get certain items by slice\n    objs = hk[233:666]\n    \n    # remove key in hyckle\n    hk.remove('test_0')\n    \n    # flush to disk. \n    # Normally hyckle will auto-flush to disk every K item adding (K = buffersize)\n    hk.flush()\n    \n    # close a hyckle file. \n    # After final reading/writing hyckle, you should close it to ensure data integrity.\n    hk.close()\n\n### Advanced Usage\n\n    # create a hyckle with custom compression,\n    # lzma is much slower but smaller\n    hk = Hyckle('helloworld.hyckle', compression='lzma')\n    \n    # or use gzip (default) with different compression level,\n    # bigger number means smaller filesize.\n    hk = Hyckle('helloworld.hyckle', compression=9)\n    \n    # sppedup I/O using bigger buffer.\n    # Noted, bigger buffersize means allocating more memory.\n    hk = Hyckle('helloworld.hyckle', buffer_size=128)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzylo117%2Fhyckle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzylo117%2Fhyckle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzylo117%2Fhyckle/lists"}