{"id":22282761,"url":"https://github.com/warrenspe/kimchi","last_synced_at":"2026-05-10T16:14:39.413Z","repository":{"id":62574235,"uuid":"60578959","full_name":"warrenspe/kimchi","owner":"warrenspe","description":"C Library for serializing certain python types","archived":false,"fork":false,"pushed_at":"2018-10-12T16:18:09.000Z","size":175,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T11:02:37.348Z","etag":null,"topics":["pickle","python","python2","python3","serialization","unicode"],"latest_commit_sha":null,"homepage":null,"language":"C","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/warrenspe.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":"2016-06-07T03:28:09.000Z","updated_at":"2018-10-27T19:55:39.000Z","dependencies_parsed_at":"2022-11-03T17:30:30.067Z","dependency_job_id":null,"html_url":"https://github.com/warrenspe/kimchi","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warrenspe%2Fkimchi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warrenspe%2Fkimchi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warrenspe%2Fkimchi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warrenspe%2Fkimchi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/warrenspe","download_url":"https://codeload.github.com/warrenspe/kimchi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245534581,"owners_count":20631287,"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":["pickle","python","python2","python3","serialization","unicode"],"created_at":"2024-12-03T16:35:55.153Z","updated_at":"2026-05-10T16:14:34.386Z","avatar_url":"https://github.com/warrenspe.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kimchi\nPython2 \u0026 3 C Extension for serializing certain built-in Python types\n\n`kimchi` offers functionality very similar to the default `pickle` module.  Unlike `pickle` though, `kimchi` cannot serialize generic Python objects and classes.  `kimchi` can only serialize built in Python objects - in particular:\n* Integers (only in Python2)\n* Floats\n* Longs\n* Strings (Bytes in Python3)\n* Unicodes (Strings in Python3)\n* Lists\n* Tuples\n* Sets\n* Frozensets\n* Dictionaries\n* None objects\n* Booleans\n\nHowever, for most objects `kimchi` performs serialization faster than the built-in `pickle` library, and more importantly, produces more compact objects.\n\n## Usage\nkimchi has two single argument functions, `loads` and `dumps`.  `dumps` is used to create serializations of objects, and `loads` is used to recreate the original object given its serialization.\n\n## Installation\n#### Using git\n```\n$ git clone https://github.com/warrenspe/kimchi.git\n$ cd kimchi\n$ sudo python3 setup.py install\n```\n\n## Examples\n```\n\u003e\u003e\u003e import kimchi\n\u003e\u003e\u003e serialization = kimchi.dumps(123)\n\u003e\u003e\u003e serialization\n'\\x01\\x81{'\n\u003e\u003e\u003e kimchi.loads(serialization)\n123\n\n\u003e\u003e\u003e serialization = kimchi.dumps('123')\n\u003e\u003e\u003e serialization\n'\\x05\\x83123'\n\u003e\u003e\u003e kimchi.loads(serialization)\n'123'\n\n\u003e\u003e\u003e serialization = kimchi.dumps([1, 2, 3, ('4', '5', '6')])\n\u003e\u003e\u003e serialization\n'\\x08\\x96\\x84\\x01\\x81\\x01\\x01\\x81\\x02\\x01\\x81\\x03\\t\\x8a\\x83\\x05\\x814\\x05\\x815\\x05\\x816'\n\u003e\u003e\u003e kimchi.loads(serialization)\n[1, 2, 3, ('4', '5', '6')]\n```\n\n## Speed and size comparisons to the built-in pickle\nNote that all tests were done in Python2, comparing to its cPickle module\n\n### Integers\n![Alt text](https://drive.google.com/uc?id=0BwLoYm538Nb6OTZSeDAyOWxCRms \"\")\n### Floats\n![Alt text](https://drive.google.com/uc?id=0BwLoYm538Nb6aHd1MmFiT3ZjZTA \"\")\nNote: constant size, might be revisited later\n### Longs\n![Alt text](https://drive.google.com/uc?id=0BwLoYm538Nb6SnZoSHg1c29xb00 \"\")\n### Strings (Bytes in Python3)\n![Alt text](https://drive.google.com/uc?id=0BwLoYm538Nb6aEpwZ2hKMVIwSjg \"\")\nNote that the final string was not included in the size comparison, as the size skews the axis of the graph.  The serialized sizes are:\nkimchi: 1003, pickle: 1008\n### Unicodes (Strings in Python3)\n![Alt text](https://drive.google.com/uc?id=0BwLoYm538Nb6dTRZd0lGS0V2Qkk \"\")\n\nNote that the final unicode string was not included in the size comparison, as the size skews the axis of the graph.  The serialized sizes are:\nkimchi: 1003, pickle: 1006\n### None objects\n![Alt text](https://drive.google.com/uc?id=0BwLoYm538Nb6NGJCclhpSzdobTQ \"\")\n\n### Boolean objects\n![Alt text](https://drive.google.com/uc?id=0BwLoYm538Nb6ZDhjQnhDLXpoR0k \"\")\n\n***\n**Note**: Speed and size for the following types is largely influenced by the items within them, to give the best results they have been filled with the data type which gives the most similar serialization times and sizes between pickle and kimchi, string/bytes objects.  \n***\n### Dictionaries\n![Alt text](https://drive.google.com/uc?id=0BwLoYm538Nb6YUNEck5ubGt4WHM \"\")\n### Lists\n![Alt text](https://drive.google.com/uc?id=0BwLoYm538Nb6NmJiOUNleElZUVE \"\")\n### Tuples\n![Alt text](https://drive.google.com/uc?id=0BwLoYm538Nb6NFdLNTdkTFlZVzA \"\")\n### Sets\n![Alt text](https://drive.google.com/uc?id=0BwLoYm538Nb6LW5kUVU1eGIzODQ \"\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarrenspe%2Fkimchi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwarrenspe%2Fkimchi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarrenspe%2Fkimchi/lists"}