def get_component_by_name(app, name):
 sa_session = app.model.context.current
 return sa_session.query(app.model.Component).filter((app.model.Component.table.c.name == name)).first()

def get_component_by_name ( app , name ) : sa_session = app . model . context . current return sa_session . query ( app . model . Component ) . filter ( ( app . model . Component . table . c . name == name ) ) . first ( )
get a component from the database via a name .