def main(db, feed_type, out): """Generate feeds for Symplectic Elements. The data is pulled from a database identified by DB, which should be a valid SQLAlchemy database connection string. For oracle use: oracle://<username>:<password>@<server>:1521/<sid> The feed will be printed to stdout if OUT is not specified. FEED_TYPE should be 'people' or 'articles'. """ engine.configure(db) if feed_type == 'people': with person_feed(out) as f: for person in people(): f(person) elif feed_type == 'articles': with article_feed(out) as f: for article in articles(): f(article)
def app_init(): engine.configure('sqlite://') metadata.bind = engine() metadata.create_all()
def load(db): engine.configure(db) with session() as s: pass