Started the process of switching to SQLAlchemy - still in development