Installation¶
Requirements¶
- Python 3.10+
- pydantic >= 2.0.0
- marshmallow >= 3.18.0 (3.x and 4.x supported)
Marshmallow Version Compatibility¶
pydantic-marshmallow supports both Marshmallow 3.x and 4.x. The library automatically detects the installed version and adapts its behavior:
| Marshmallow | Status | Notes |
|---|---|---|
| 3.18.0+ | ✅ Supported | Full compatibility |
| 4.0.0+ | ✅ Supported | Adapts to API changes (e.g., context parameter removal) |
Upgrading Marshmallow
When upgrading from Marshmallow 3.x to 4.x, consult the Marshmallow migration guide for breaking changes that may affect your own code.
Install from PyPI¶
Install with Optional Dependencies¶
For development and testing:
This includes:
- pytest, pytest-cov for testing
- mypy for type checking
- ruff for linting
- Integration testing dependencies (flask-marshmallow, webargs, apispec, etc.)