github jcrist/msgspec 0.6.0
Version 0.6.0

latest releases: 0.18.6, 0.18.5, 0.18.4...
2 years ago
  • Add a new msgspec.Raw type for delayed decoding of message fields / serializing already encoded fields.
  • Add omit_defaults option to Struct types (docs). If enabled, fields containing their respective default value will be omitted from serialized message. This improves both encode and decode performance.
  • Add rename option to Struct types (docs) for altering the field names used for encoding. A major use of this is supporting camelCase JSON field names, while letting Python code use the more standard snake_case field names.
  • Improve performance of nogc=True structs. GC is now avoided in more cases, and nogc=True structs use 16 fewer bytes per instance. Also added a benchmark for how msgspec can interact with application GC usage.
  • Cache creation of tagged union lookup tables, reducing memory usage for applications making heavy use of tagged unions.
  • Support encoding and decoding frozenset instances
  • A smattering of other performance improvements.

Don't miss a new msgspec release

NewReleases is sending notifications on new releases.