marshmallow-oneofschema icon indicating copy to clipboard operation
marshmallow-oneofschema copied to clipboard

Support for marshmallow_dataclass?

Open mikeholler opened this issue 4 years ago • 0 comments

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?

mikeholler avatar Dec 10 '19 15:12 mikeholler