This module provides object-relational mapping facilities powered by SQLAlchemy.
In order to define persist model class, just subclass Base:
from sqlalchemy import *
import defernia.orm
class Thing(defernia.orm.Base):
'''A something object-relationally mapped.'''
id = Column(Integer, primary_key=True)
value = Column(UnicodeText, nullable=False)
__tablename__ = 'things'
SQLAlchemy session class.
See also
SQLAlchemy declarative base class.
See also
Make a repr() string for the given self object.
Parameters: | self – an object to make a repr() string |
---|---|
Returns: | a repr() string |
Return type: | str |