def main(argv=sys.argv):
    if len(argv) < 2:
        usage(argv)
    config_uri = argv[1]
    options = parse_vars(argv[2:])
    setup_logging(config_uri)
    settings = get_appsettings(config_uri, options=options)
    engine = engine_from_config(settings, 'sqlalchemy.')
    DBSession.configure(bind=engine)
    Base.metadata.create_all(engine)
    with transaction.manager:
        i = 0
        while i < 30:
            address = Address(description='Address#2' + str(i).rjust(2, "0"))
            DBSession.add(address)
            user = User(name='User#1' + str(i).rjust(2, "0"))
            user.address = address
            DBSession.add(user)
            sleep(1)
            i += 1
Populate database with 30 users.
dataset/ETHPy150Open Pegase745/sqlalchemy-datatables/examples/pyramid_tut/pyramid_tut/scripts/initializedb.py/main