marshmallow-oneofschema
marshmallow-oneofschema copied to clipboard
Support for marshmallow_dataclass?
All of the examples I see for this library are with the traditional marshmallow implementation, but is there a way to use this library with marshmallow-dataclass
? [1]
The reduced overhead and use of the preexisting dataclasses.dataclass
is very appealing me.
Here's a simple usage example of marshmallow-dataclass
in case you're unfamiliar:
from dataclasses import dataclass
from datetime import date
import marshmallow_dataclass
@dataclass
class Person:
name: str
birth: date
PersonSchema = marshmallow_dataclass.class_schema(Person)
How might this library work in the context of marshmallow_dataclass
?