This object is inspired by an example from the sqlalchemy recipe docs.