friendships_of = db.relationship('Friendship', foreign_keys=
    'Friendship.Friend_id', backref='friendee')


class Friendship(db.Model):
    __tablename__ = 'Friendship'
ID = db.Column(db.Integer, primary_key=True)
User_id = db.Column(db.Integer, db.ForeignKey('User.ID'))
Friend_id = db.Column(db.Integer, db.ForeignKey('User.ID'))
SQLAlchemy: exclude rows taken from a subquery on a query