File size: 403 Bytes
105b369
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
try:
    from sqlalchemy.orm import DeclarativeBase
except ImportError:
    raise ImportError("`sqlalchemy` not installed")


class BaseTable(DeclarativeBase):
    """
    Base class for SQLAlchemy model definitions.

    https://docs.sqlalchemy.org/en/20/orm/mapping_api.html#sqlalchemy.orm.DeclarativeBase
    https://fastapi.tiangolo.com/tutorial/sql-databases/#create-a-base-class
    """

    pass