models = [obj for name, obj in inspect.getmembers(tables, lambda obj: type(
    obj) == type and issubclass(obj, peewee.Model))]
peewee.create_model_tables(models)
How to create all tables defined in models using peewee