def trySelect()

in tbapi/__init__.py [0:0]


    def trySelect(self, timestamp: int, options: SelectionOptions, types: 'list[str]', entities: 'list[str]') -> 'TickCursor':
        '''Contextmanager version of select. Usage:
            ```
            with stream.newSelect(timestamp, options, types, entities) as cursor:
                while cursor.next():
                    message = cursor.getMessage()
            ```
        '''
        cursor = None
        try:
            cursor = self.__select(timestamp, options, types, entities)
            yield cursor
        finally:
            cursor.close()