👨‍💻 Explicitly (re-)export in the package __init__.py (including marshmallow exports)

This commit is contained in:
2023-03-13 18:54:18 +01:00
parent 4dd1fbaf53
commit d272864e44
2 changed files with 41 additions and 6 deletions

View File

@ -19,5 +19,41 @@ __doc__ = """
Generic schema with full typing support and minimal boilerplate.
"""
from .decorators import post_load
from .schema import GenericSchema
__all__ = [
# Custom:
"GenericSchema",
"post_load",
# Re-exports from marshmallow:
"EXCLUDE",
"INCLUDE",
"RAISE",
"Schema",
"SchemaOpts",
"fields",
"validates",
"validates_schema",
"pre_dump",
"post_dump",
"pre_load",
# "post_load",
"pprint",
"ValidationError",
"missing",
]
from marshmallow import fields
from marshmallow.decorators import (
post_dump,
# post_load, # overloaded
pre_dump,
pre_load,
validates,
validates_schema,
)
from marshmallow.exceptions import ValidationError
from marshmallow.schema import Schema, SchemaOpts
from marshmallow.utils import EXCLUDE, INCLUDE, RAISE, missing, pprint
from marshmallow_generic.decorators import post_load
from marshmallow_generic.schema import GenericSchema