marshmallow_enum
marshmallow_enum copied to clipboard
Enum handling for Marshmallow
In Releae v3.18.0 marshmallow added Enum support: See https://github.com/marshmallow-code/marshmallow/blob/dev/CHANGELOG.rst#3180-2022-09-15 I wonder if this package is still necessary if your running on marshmallow >=v3.18?
Hey there, thanks for a very useful library! Did you consider merging it into Marshmallow project? I see this project as a basic functionality that should come with Marshmallow.
We try to use the same serializer for loading and dumping, and some of our internal objects are simple dicts with string fields, and we are forced to manually convert...
This library still uses Marshmallow's `Field.fail()` to raise errors but [this method is deprecated](https://marshmallow.readthedocs.io/en/stable/marshmallow.fields.html?highlight=Field#marshmallow.fields.Field.fail) and will be removed in Marshmallow 4. This PR changes marshmallow_enum to use the new method...
Why this isn't working? If I change `EnumField` to be `StringField` it works, so the problem probably is `marshmallow_enum` ```py from enum import Enum from marshmallow_enum import EnumField from mongoengine...
Passing the enum through to the super-class allows it to be used for APISpec/OpenAPI schema definitions, an important use-case for marshmallow. Given that it's the first parameter of the function,...
marshmallow 3.0.0 doesn't perform validation during dump[s]. In order to get the equivalent behaviour as before, validate must be called. However, this fails with "Enum name must be string" for...
Hi, I'm using marshmallow_enum to handle the serialization of my Enum. I have the following code : ``` class EntitySchema(ma.SQLAlchemyAutoSchema): class Meta: ordered = True def on_bind_field(self, field_name, field_obj): field_obj.data_key...