Overview

msgspec 0.20, released on November 23, 2025, adds Python 3.14 support, free-threaded mode and StructMeta.

Main Features

Python 3.14 and free-threaded

msgspec is compatible with Python 3.14 and free-threaded mode (no GIL), enabling performant serialization in multi-threaded contexts.

python
import msgspec

class User(msgspec.Struct):
    name: str
    age: int

data = msgspec.json.encode(User('Alice', 30))
print(data)  # b'{"name":"Alice","age":30}'

StructMeta

StructMeta allows customizing Struct class creation via a metaclass, offering more flexibility for advanced use cases.

Sources