Peewee
from peewee import *
class Post(Model):
title = CharField()
body = TextField()
timestamp = DateTimeField()
class Meta:
database = dbfrom peewee import *
class User(Model):
name = CharField()
class Post(Model):
title = CharField()
body = TextField()
timestamp = DateTimeField()
user = ForeignKeyField(User, backref='posts')
class Meta:
database = db