def init_db(uri, base, **kwargs):
    """Create engine and tables
    :param uri: db uri
    :param base: declarative base
    :returns: an engine
    """
    engine = create_engine(uri, **kwargs)
    base.metadata.create_all(engine)
    return engine