Written by David Mcilwee in python on Thu 12 February 2015. Tags: python, sqlalchemy, postgresql,
Postgresql has some very handy features, one of which is the range type. This allows you to express a distinct block of time as a unique value.
Using SQLAlchemy we can quickly use this to add more meaning and cut down on boiler plate.
from sqlalchemy import Column from sqlalchemy ...