Stack Explorer

Marshmallow

serialization

Object serialization/deserialization and validation library

8M/week → Stable

Features

serializationvalidationschemaapiorm

Pros and Cons

Ventajas

  • + Very flexible and extensible
  • + Robust validation
  • + Nested schemas
  • + Pre/post processing hooks
  • + SQLAlchemy integration
  • + Large community

Desventajas

  • - More verbose than pydantic
  • - Lower performance than pydantic
  • - Learning curve
  • - No native type hints
  • - Considerable boilerplate

Use Cases

  • REST API serialization
  • Input data validation
  • ORM object transformation
  • Flask APIs
  • Data migration
  • Schema documentation

Tecnologías Relacionadas