def main(config):
    cfg = cliconfig(config)
    session = SessionFactory(cfg['database']['url'], True).create()
    session.commit()
Exemplo n.º 2
0
def main(config, **kwargs):
    cfg = cliconfig(config)
    session = SessionFactory(cfg['database']['url']).create()
    clistream(session.add, JPAddress._make, mapping, lambda e: Address(**e),
        delimiter=',', **kwargs)
    session.commit()