(self, session, model, **kwargs)
return instance or model(**kwargs)
Get an ORM instance or create it if not exist.
        @param session: SQLAlchemy session object
        @param model: model to query
        @return: row instance
Get an ORM instance or create it if not exist.
Get an ORM instance or create it if not exist .
def _get_or_create(self, session, model, **kwargs):
        """Get an ORM instance or create it if not exist.
        @param session: SQLAlchemy session object
        @param model: model to query
        @return: row instance
        """
        instance = session.query(model).filter_by(**kwargs).first()
        return instance or model(**kwargs)
def _get_or_create ( self , session , model , * * kwargs ) : instance = session . query ( model ) . filter_by ( * * kwargs ) . first ( ) return instance or model ( * * kwargs )