ppc64le/linux-1.0.0/: msgspec-0.18.6 metadata and description

Homepage Simple index Newer version available

A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML.

classifiers
  • License :: OSI Approved :: BSD License
  • Development Status :: 4 - Beta
  • Programming Language :: Python :: 3.8
  • Programming Language :: Python :: 3.9
  • Programming Language :: Python :: 3.10
  • Programming Language :: Python :: 3.11
  • Programming Language :: Python :: 3.12
  • Environment :: MetaData :: IBM Python Ecosystem
description_content_type text/markdown
dynamic
  • classifier
  • description
  • description-content-type
  • home-page
  • keywords
  • license
  • license-file
  • maintainer
  • maintainer-email
  • project-url
  • provides-extra
  • requires-python
  • summary
keywords JSON msgpack MessagePack TOML YAML serialization validation schema
license BSD
license_file
  • LICENSE
maintainer Jim Crist-Harif
maintainer_email [email protected]
project_urls
  • Documentation, https://jcristharif.com/msgspec/
  • Source, https://github.com/jcrist/msgspec/
  • Issue Tracker, https://github.com/jcrist/msgspec/issues
provides_extras
  • yaml
  • toml
  • doc
  • test
  • dev
requires_dist
  • pyyaml; extra == "yaml"
  • tomli; python_version < "3.11" and extra == "toml"
  • tomli_w; extra == "toml"
  • sphinx; extra == "doc"
  • furo; extra == "doc"
  • sphinx-copybutton; extra == "doc"
  • sphinx-design; extra == "doc"
  • ipython; extra == "doc"
  • pytest; extra == "test"
  • mypy; extra == "test"
  • pyright; extra == "test"
  • msgpack; extra == "test"
  • attrs; extra == "test"
  • pyyaml; extra == "test"
  • tomli; python_version < "3.11" and extra == "test"
  • tomli_w; extra == "test"
  • pre-commit; extra == "dev"
  • coverage; extra == "dev"
  • gcovr; extra == "dev"
  • sphinx; extra == "dev"
  • furo; extra == "dev"
  • sphinx-copybutton; extra == "dev"
  • sphinx-design; extra == "dev"
  • ipython; extra == "dev"
  • pytest; extra == "dev"
  • mypy; extra == "dev"
  • pyright; extra == "dev"
  • msgpack; extra == "dev"
  • attrs; extra == "dev"
  • pyyaml; extra == "dev"
  • tomli; python_version < "3.11" and extra == "dev"
  • tomli_w; extra == "dev"
requires_python >=3.8
File Tox results History
msgspec-0.18.6-cp310-cp310-linux_ppc64le.whl
Size
789 KB
Type
Python Wheel
Python
3.10
msgspec-0.18.6-cp311-cp311-linux_ppc64le.whl
Size
755 KB
Type
Python Wheel
Python
3.11
msgspec-0.18.6-cp312-cp312-linux_ppc64le.whl
Size
774 KB
Type
Python Wheel
Python
3.12
msgspec-0.18.6-cp39-cp39-linux_ppc64le.whl
Size
740 KB
Type
Python Wheel
Python
3.9

msgspec

msgspec is a fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML. It features:

All of this is included in a lightweight library with no required dependencies.


msgspec may be used for serialization alone, as a faster JSON or MessagePack library. For the greatest benefit though, we recommend using msgspec to handle the full serialization & validation workflow:

Define your message schemas using standard Python type annotations.

>>> import msgspec

>>> class User(msgspec.Struct):
...     """A new type describing a User"""
...     name: str
...     groups: set[str] = set()
...     email: str | None = None

Encode messages as JSON, or one of the many other supported protocols.

>>> alice = User("alice", groups={"admin", "engineering"})

>>> alice
User(name='alice', groups={"admin", "engineering"}, email=None)

>>> msg = msgspec.json.encode(alice)

>>> msg
b'{"name":"alice","groups":["admin","engineering"],"email":null}'

Decode messages back into Python objects, with optional schema validation.

>>> msgspec.json.decode(msg, type=User)
User(name='alice', groups={"admin", "engineering"}, email=None)

>>> msgspec.json.decode(b'{"name":"bob","groups":[123]}', type=User)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
msgspec.ValidationError: Expected `str`, got `int` - at `$.groups[0]`

msgspec is designed to be as performant as possible, while retaining some of the nicities of validation libraries like pydantic. For supported types, encoding/decoding a message with msgspec can be ~10-80x faster than alternative libraries.

See the documentation for more information.

LICENSE

New BSD. See the License File.