class User(Base):
    __tablename__ = 'users'
email = Column(String, primary_key=True)
name = Column(String)


class Document(Base):
    __tablename__ = 'documents'
name = Column(String, primary_key=True)
author_email = Column(String, ForeignKey('users.email'))
author = relation(User, backref='documents')
sqlalchemy: how to join several tables by one query?