## amsgpack - Python Message Pack module
C library for python 3.10+.
Why:
* I couldn't negotiate adding type hints to [msgpack-python](https://github.com/msgpack/msgpack-python/pull/552)
* I couldn't negotiate adding Unpacker to [ormsgpack](https://github.com/aviramha/ormsgpack/issues/227)
* There's no stream unpacking in [msgspec](https://github.com/jcrist/msgspec)
* I couldn't find another MessagePack library
* `msgpack-python` interfaces are messy and the library is a bit slow
### Installation
`pip install amsgpack`
### Examples
```Python console
>>> from amsgpack import packb, unpackb
>>> packb({"compact": True, "schema": 0})
b'\x82\xa7compact\xc3\xa6schema\x00'
>>> unpackb(b'\x82\xa7compact\xc3\xa6schema\x00')
{'compact': True, 'schema': 0}
```
```Python console
>>> from amsgpack import FileUnpacker
>>> from io import BytesIO
>>> for data in FileUnpacker(BytesIO(b'\x00\x01\x02')):
... print(data)
...
0
1
2
```
```Python console
>>> from amsgpack import Unpacker
>>> unpacker = Unpacker()
>>> unpacker.feed(b'\x82\xa7compact\xc3\xa6schema\x00')
>>> next(unpacker)
{'compact': True, 'schema': 0}
```
### Benchmark

Run `amsgpack_benchmark.py` and then `chart.py` to get your values
Raw data
{
"_id": null,
"home_page": null,
"name": "amsgpack",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "msgpack, messagepack, serializer, serialization, binary",
"author": null,
"author_email": "Arseniy Terekhin <senyai@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ba/56/2a1b9547af45465834241bf1d7850faf04b52db96da32a1e0f4d518b3bbd/amsgpack-0.2.0.tar.gz",
"platform": null,
"description": "## amsgpack - Python Message Pack module\n\nC library for python 3.10+.\n\nWhy:\n * I couldn't negotiate adding type hints to [msgpack-python](https://github.com/msgpack/msgpack-python/pull/552)\n * I couldn't negotiate adding Unpacker to [ormsgpack](https://github.com/aviramha/ormsgpack/issues/227)\n * There's no stream unpacking in [msgspec](https://github.com/jcrist/msgspec)\n * I couldn't find another MessagePack library\n * `msgpack-python` interfaces are messy and the library is a bit slow\n\n\n### Installation\n`pip install amsgpack`\n\n\n### Examples\n\n```Python console\n>>> from amsgpack import packb, unpackb\n>>> packb({\"compact\": True, \"schema\": 0})\nb'\\x82\\xa7compact\\xc3\\xa6schema\\x00'\n>>> unpackb(b'\\x82\\xa7compact\\xc3\\xa6schema\\x00')\n{'compact': True, 'schema': 0}\n```\n\n```Python console\n>>> from amsgpack import FileUnpacker\n>>> from io import BytesIO\n>>> for data in FileUnpacker(BytesIO(b'\\x00\\x01\\x02')):\n... print(data)\n...\n0\n1\n2\n```\n\n```Python console\n>>> from amsgpack import Unpacker\n>>> unpacker = Unpacker()\n>>> unpacker.feed(b'\\x82\\xa7compact\\xc3\\xa6schema\\x00')\n>>> next(unpacker)\n{'compact': True, 'schema': 0}\n```\n\n### Benchmark\n\n\nRun `amsgpack_benchmark.py` and then `chart.py` to get your values\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Another MessagePack library",
"version": "0.2.0",
"project_urls": {
"Source": "https://github.com/senyai/amsgpack"
},
"split_keywords": [
"msgpack",
" messagepack",
" serializer",
" serialization",
" binary"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ba562a1b9547af45465834241bf1d7850faf04b52db96da32a1e0f4d518b3bbd",
"md5": "7e0b1e2a40e7a338591f271e3bec6c7a",
"sha256": "38bec137c9a159c4051e77c370463771678bed51154e65a6da99f1c4051dc3de"
},
"downloads": -1,
"filename": "amsgpack-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "7e0b1e2a40e7a338591f271e3bec6c7a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 77402,
"upload_time": "2025-07-10T08:37:38",
"upload_time_iso_8601": "2025-07-10T08:37:38.458615Z",
"url": "https://files.pythonhosted.org/packages/ba/56/2a1b9547af45465834241bf1d7850faf04b52db96da32a1e0f4d518b3bbd/amsgpack-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-10 08:37:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "senyai",
"github_project": "amsgpack",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "amsgpack"
}