Skip to content

Instantly share code, notes, and snippets.

View scott-cognizant's full-sized avatar

Scott Admiraal (Cognizant) scott-cognizant

View GitHub Profile
@scott-cognizant
scott-cognizant / pydantic_from_marshmallow.py
Last active January 26, 2024 05:47 — forked from kmatarese/pydantic_from_marshmallow.py
Hack to convert marshmallow schemas to pydantic models
"""
From:
https://gist.github.com/kmatarese/a5492f4a02449e13ea85ace8801b8dfb
Customized by Bright Wolf to improve in various ways including recursion and
support data_key for field name
WARNING: not thoroughly tested and does not support full translation
between the two libraries.