'I'd like to know how this query will be in sqlalchemy orm

How can I express the following query through the SQLAlchemy API?

SELECT 
    interests.*,
    (
        SELECT 
            COUNT(interest_items.id)
        FROM 
            interest_items
        WHERE 
            interests.id = interest_items.interest_id
    ) AS sany
FROM 
    public.interests;


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source