How to use the marshmallow-sqlalchemy.schema.ModelSchema function in marshmallow-sqlalchemy

To help you get started, we’ve selected a few marshmallow-sqlalchemy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github raminfp / PYHelper / marshmallow-sqlalchemy / schema.py View on Github external
def validate(self, data, session=None, *args, **kwargs):
        self.session = session or self.session
        if not self.session:
            raise ValueError('Validation requires a session')
        return super(ModelSchema, self).validate(data, *args, **kwargs)