import peewee DB_PROXY = peewee.Proxy() class BaseModel(peewee.Model): class Meta: database = DB_PROXY class Ordner(BaseModel): id = peewee.AutoField() parent = peewee.IntegerField() name = peewee.TextField() zuletzt_verwendet = peewee.TimestampField() class Foto(BaseModel): id = peewee.AutoField() ordner = peewee.IntegerField() name = peewee.CharField() notiz = peewee.CharField() # 255? def db_create_table(): DB_PROXY.create_tables([Ordner, Foto])