sqlalchemy_extended package

Submodules

sqlalchemy_extended.base_model module

class sqlalchemy_extended.base_model.BaseModel[source]

Bases: object

This is an alternative Base class which you can use to extend from.

If you use the declarative_base tool from SQLAlchemy, simply do the following:

from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy_extended import BaseModel

class MyBase(BaseModel)
    pass

declarative_base(cls=MyBase)
columns() Iterable[str][source]
dto() Dict[Any, Any][source]
static ensure_serializable(value: Any) Any[source]
safe_columns() Iterable[str][source]
update(**kwargs: Dict[str, str]) None[source]

Given a list of keword arguments, update the model.

Skips the id column.

Module contents

sqlalchemy_extended is meant to add some conveniences to the Base SQLAlchemy classes. For more information please see [SQLAlchemy](https://docs.sqlalchemy.org/) for more information.