René's URL Explorer Experiment
go
Title:
Usage
direct link
Domain:
msgspec.dev
color-scheme
light dark
Links
:
Skip to content
https://msgspec.dev/usage.html#furo-main-content
msgspec
https://msgspec.dev/index.html
https://msgspec.dev/index.html
Why msgspec?
https://msgspec.dev/why.html
Installation
https://msgspec.dev/install.html
Benchmarks
https://msgspec.dev/benchmarks.html
Usage
https://msgspec.dev/usage.html
Supported Types
https://msgspec.dev/supported-types.html
Structs
https://msgspec.dev/structs.html
Constraints
https://msgspec.dev/constraints.html
Converters
https://msgspec.dev/converters.html
JSON Schema
https://msgspec.dev/jsonschema.html
Schema Evolution
https://msgspec.dev/schema-evolution.html
Extending
https://msgspec.dev/extending.html
Inspecting Types
https://msgspec.dev/inspect.html
Performance Tips
https://msgspec.dev/perf-tips.html
Porting guides
https://msgspec.dev/porting/index.html
Porting from orjson
https://msgspec.dev/porting/orjson.html
API Docs
https://msgspec.dev/api.html
Examples
https://msgspec.dev/examples/index.html
GeoJSON
https://msgspec.dev/examples/geojson.html
Asyncio TCP Key-Value Server
https://msgspec.dev/examples/asyncio-kv.html
Conda Repodata
https://msgspec.dev/examples/conda-repodata.html
Parsing pyproject.toml
https://msgspec.dev/examples/pyproject-toml.html
Changelog
https://msgspec.dev/changelog.html
Back to top
https://msgspec.dev/usage.html
View this page
https://msgspec.dev/_sources/usage.rst.txt
¶
https://msgspec.dev/usage.html#usage
JSON
https://json.org
MessagePack
https://msgpack.org
YAML
https://yaml.org
TOML
https://toml.io/en/
¶
https://msgspec.dev/usage.html#encoding
¶
https://msgspec.dev/usage.html#decoding
¶
https://msgspec.dev/usage.html#typed-decoding
JSON
https://json.org
MessagePack
https://msgpack.org
Struct
https://msgspec.dev/structs.html
dict
https://docs.python.org/3/library/stdtypes.html#dict
type annotations
https://docs.python.org/3/library/typing.html
mypy
https://mypy.readthedocs.io/en/stable/
pyright
https://github.com/microsoft/pyright
type annotations
https://docs.python.org/3/library/typing.html
wide variety of builtin types are supported
https://msgspec.dev/supported-types.html
Struct
https://msgspec.dev/structs.html
¶
https://msgspec.dev/usage.html#strict-vs-lax-mode
pydantic
https://pydantic.dev/docs/validation/latest/get-started/
Supported Types
https://msgspec.dev/supported-types.html
¶
https://msgspec.dev/usage.html#converting-to-and-from-builtin-types
msgspec.to_builtins
https://msgspec.dev/api.html#msgspec.to_builtins
msgspec.convert
https://msgspec.dev/api.html#msgspec.convert
dict
https://docs.python.org/3/library/stdtypes.html#dict
list
https://docs.python.org/3/library/stdtypes.html#list
str
https://docs.python.org/3/library/stdtypes.html#str
int
https://docs.python.org/3/library/functions.html#int
msgspec.to_builtins
https://msgspec.dev/api.html#msgspec.to_builtins
msgspec.json.encode
https://msgspec.dev/api.html#msgspec.json.encode
msgspec.msgpack.encode
https://msgspec.dev/api.html#msgspec.msgpack.encode
Omitting Default Values
https://msgspec.dev/structs.html#omit-defaults
tagged unions
https://msgspec.dev/structs.html#struct-tagged-unions
UNSET
https://msgspec.dev/supported-types.html#unset-type
msgspec.Struct
https://msgspec.dev/api.html#msgspec.Struct
dataclasses.dataclass
https://docs.python.org/3/library/dataclasses.html#dataclasses.dataclass
attrs
https://www.attrs.org/en/stable/index.html
typing.TypedDict
https://docs.python.org/3/library/typing.html#typing.TypedDict
typing.NamedTuple
https://docs.python.org/3/library/typing.html#typing.NamedTuple
bytes
https://docs.python.org/3/library/stdtypes.html#bytes
bytearray
https://docs.python.org/3/library/stdtypes.html#bytearray
memoryview
https://docs.python.org/3/library/stdtypes.html#memoryview
datetime.datetime
https://docs.python.org/3/library/datetime.html#datetime.datetime
datetime.date
https://docs.python.org/3/library/datetime.html#datetime.date
datetime.time
https://docs.python.org/3/library/datetime.html#datetime.time
datetime.timedelta
https://docs.python.org/3/library/datetime.html#datetime.timedelta
uuid.UUID
https://docs.python.org/3/library/uuid.html#uuid.UUID
decimal.Decimal
https://docs.python.org/3/library/decimal.html#decimal.Decimal
set
https://docs.python.org/3/library/stdtypes.html#set
frozenset
https://docs.python.org/3/library/stdtypes.html#frozenset
list
https://docs.python.org/3/library/stdtypes.html#list
dict
https://docs.python.org/3/library/stdtypes.html#dict
enum.Enum
https://docs.python.org/3/library/enum.html#enum.Enum
msgspec.convert
https://msgspec.dev/api.html#msgspec.convert
Converters
https://msgspec.dev/converters.html
msgspec.structs.asdict
https://msgspec.dev/api.html#msgspec.structs.asdict
msgspec.structs.astuple
https://msgspec.dev/api.html#msgspec.structs.astuple
msgspec.to_builtins
https://msgspec.dev/api.html#msgspec.to_builtins
dataclasses.asdict
https://docs.python.org/3/library/dataclasses.html#dataclasses.asdict
dataclasses.astuple
https://docs.python.org/3/library/dataclasses.html#dataclasses.astuple
dict
https://docs.python.org/3/library/stdtypes.html#dict
tuple
https://docs.python.org/3/library/stdtypes.html#tuple
msgspec.UNSET
https://msgspec.dev/api.html#msgspec.UNSET
msgspec.Struct
https://msgspec.dev/api.html#msgspec.Struct
dataclasses.dataclass
https://docs.python.org/3/library/dataclasses.html#dataclasses.dataclass
attrs
https://www.attrs.org/en/stable/index.html
bytes
https://docs.python.org/3/library/stdtypes.html#bytes
datetime.datetime
https://docs.python.org/3/library/datetime.html#datetime.datetime
uuid.UUID
https://docs.python.org/3/library/uuid.html#uuid.UUID
decimal.Decimal
https://docs.python.org/3/library/decimal.html#decimal.Decimal
enum.Enum
https://docs.python.org/3/library/enum.html#enum.Enum
msgspec.to_builtins
https://msgspec.dev/api.html#msgspec.to_builtins
Next Supported Types
https://msgspec.dev/supported-types.html
Previous Benchmarks
https://msgspec.dev/benchmarks.html
Sphinx
https://www.sphinx-doc.org/
@pradyunsg
https://pradyunsg.me
Furo
https://github.com/pradyunsg/furo
https://github.com/msgspec/msgspec
Usage
https://msgspec.dev/usage.html
Encoding
https://msgspec.dev/usage.html#encoding
Decoding
https://msgspec.dev/usage.html#decoding
Typed Decoding
https://msgspec.dev/usage.html#typed-decoding
“Strict” vs “Lax” Mode
https://msgspec.dev/usage.html#strict-vs-lax-mode
Converting to and from Builtin Types
https://msgspec.dev/usage.html#converting-to-and-from-builtin-types
Viewport: width=device-width, initial-scale=1
URLs of
crawlers that visited me
.