src/pybel/manager/cache_manager.py
def list_recent_networks(self) -> List[Network]:
        """List the most recently created version of each network (by name)."""
        most_recent_times = self.session.query(
            Network.name.label('network_name'),
            func.max(Network.created).label('max_created'),
        )

        most_recent_times = most_recent_times.group_by(Network.name).subquery('most_recent_times')

        and_condition = and_(
            most_recent_times.c.network_name == Network.name,
            most_recent_times.c.max_created == Network.created,
        )

        most_recent_networks = self.session.query(Network).join(most_recent_times, and_condition)

        return most_recent_networks.all()
List the most recently created version of each network (by name).
List the most recently created version of each network (by name).
List the most recently created version of each network ( by name ) .
def list_recent_networks(self) -> List[Network]:
        most_recent_times = self.session.query(
            Network.name.label('network_name'),
            func.max(Network.created).label('max_created'),
        )
        most_recent_times = most_recent_times.group_by(Network.name).subquery('most_recent_times')
        and_condition = and_(
            most_recent_times.c.network_name == Network.name,
            most_recent_times.c.max_created == Network.created,
        )
        most_recent_networks = self.session.query(Network).join(most_recent_times, and_condition)
        return most_recent_networks.all()
def list_recent_networks ( self ) -> List [ Network ] : most_recent_times = self . session . query ( Network . name . label ( 'network_name' ) , func . max ( Network . created ) . label ( 'max_created' ) , ) most_recent_times = most_recent_times . group_by ( Network . name ) . subquery ( 'most_recent_times' ) and_condition = and_ ( most_recent_times . c . network_name == Network . name , most_recent_times . c . max_created == Network . created , ) most_recent_networks = self . session . query ( Network ) . join ( most_recent_times , and_condition ) return most_recent_networks . all ( )
List the most recently created version of each network (by name).
List the most recently created version of each network ( by name ) .
"""List the most recently created version of each network (by name)."""
self