METADATA 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. Metadata-Version: 2.4
  2. Name: ormsgpack
  3. Version: 1.12.1
  4. Classifier: Development Status :: 5 - Production/Stable
  5. Classifier: Intended Audience :: Developers
  6. Classifier: License :: OSI Approved :: Apache Software License
  7. Classifier: License :: OSI Approved :: MIT License
  8. Classifier: Operating System :: MacOS
  9. Classifier: Operating System :: Microsoft :: Windows
  10. Classifier: Operating System :: POSIX :: Linux
  11. Classifier: Programming Language :: Python :: 3
  12. Classifier: Programming Language :: Python :: 3.10
  13. Classifier: Programming Language :: Python :: 3.11
  14. Classifier: Programming Language :: Python :: 3.12
  15. Classifier: Programming Language :: Python :: 3.13
  16. Classifier: Programming Language :: Python :: 3.14
  17. Classifier: Programming Language :: Python :: Implementation :: CPython
  18. Classifier: Programming Language :: Python :: Implementation :: GraalPy
  19. Classifier: Programming Language :: Python :: Implementation :: PyPy
  20. Classifier: Programming Language :: Python
  21. Classifier: Programming Language :: Rust
  22. Classifier: Typing :: Typed
  23. License-File: LICENSE-APACHE
  24. License-File: LICENSE-MIT
  25. Summary: Fast, correct Python msgpack library supporting dataclasses, datetimes, and numpy
  26. Keywords: fast,msgpack,dataclass,dataclasses,datetime
  27. Author-email: Aviram Hassan <aviramyhassan@gmail.com>, Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
  28. License-Expression: Apache-2.0 OR MIT
  29. Requires-Python: >=3.10
  30. Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
  31. Project-URL: Homepage, https://github.com/aviramha/ormsgpack
  32. # ormsgpack
  33. ![PyPI - Version](https://img.shields.io/pypi/v/ormsgpack)
  34. ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ormsgpack)
  35. ![PyPI - Downloads](https://img.shields.io/pypi/dm/ormsgpack)
  36. ormsgpack is a fast [MessagePack](https://msgpack.org/) serialization library for Python
  37. derived from [orjson](https://github.com/ijl/orjson), with native support for various
  38. Python types.
  39. ormsgpack follows semantic versioning and supports CPython, PyPy and GraalPy.
  40. Links:
  41. - [Repository](https://github.com/aviramha/ormsgpack)
  42. - [Documentation](https://ormsgpack.readthedocs.io/)
  43. ## Installation
  44. pip
  45. ```sh
  46. pip install ormsgpack
  47. ```
  48. uv
  49. ```sh
  50. uv add ormsgpack
  51. ```
  52. Installing from a source distribution requires
  53. [Rust](https://www.rust-lang.org/) 1.81 or newer and
  54. [maturin](https://github.com/PyO3/maturin).
  55. ## Quickstart
  56. This is an example of serializing and deserializing an object:
  57. ```python
  58. >>> import ormsgpack, datetime, numpy
  59. >>> event = {
  60. ... "type": "put",
  61. ... "time": datetime.datetime(1970, 1, 1),
  62. ... "uid": 1,
  63. ... "data": numpy.array([1, 2]),
  64. ... }
  65. >>> ormsgpack.packb(event, option=ormsgpack.OPT_SERIALIZE_NUMPY)
  66. b'\x84\xa4type\xa3put\xa4time\xb31970-01-01T00:00:00\xa3uid\x01\xa4data\x92\x01\x02'
  67. >>> ormsgpack.unpackb(_)
  68. {'type': 'put', 'time': '1970-01-01T00:00:00', 'uid': 1, 'data': [1, 2]}
  69. ```
  70. ## License
  71. orjson was written by ijl <<ijl@mailbox.org>>, copyright 2018 - 2021, licensed
  72. under both the Apache License, Version 2.0, and the MIT License.
  73. ormsgpack was forked from orjson by Aviram Hassan and is now maintained by Emanuele Giaquinta (@exg), licensed
  74. under both the Apache License, Version 2.0, and the MIT License.