marshmallow-sqlalchemy.readthedocs.io - marshmallow-sqlalchemy — marshmallow-sqlalchemy 1.0.0 documentation

Example domain paragraphs

Release v0.29.0 ( Changelog )

SQLAlchemy integration with the marshmallow (de)serialization library.

import sqlalchemy as sa from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import scoped_session , sessionmaker , relationship , backref engine = sa . create_engine ( "sqlite:///:memory:" ) session = scoped_session ( sessionmaker ( bind = engine )) Base = declarative_base () class Author ( Base ): __tablename__ = "authors" id = sa . Column ( sa . Integer , primary_key = True ) name = sa . Column ( sa . String , nullable = False ) def __repr__ ( self ): return "<Author(name= {self.na

Links to marshmallow-sqlalchemy.readthedocs.io (2)