I've defined a 1-level adjacency list relationship (children cannot nest) in SQLA 1.4:
class User(Base):
id = db.Column(db.Integer, primary_key=True)
parent_id = db.Column(db.Integer, ForeignKey("user.id"))
children = relationship("User", backref=backref("parent", remote_side=[id]))
But I'm struggling to define a hybrid or column property that will allow me to query things like (User.id, User.child_count) and apply filter criteria to parent and child.