How to use the vine.transform function in vine

To help you get started, we’ve selected a few vine examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github celery / kombu / kombu / transport / SQS.py View on Github external
def _get_async(self, queue, count=1, callback=None):
        q = self._new_queue(queue)
        qname = self.canonical_queue_name(queue)
        return self._get_from_sqs(
            qname, count=count, connection=self.asynsqs,
            callback=transform(self._on_messages_ready, callback, q, queue),
        )
github celery / kombu / kombu / asynchronous / aws / sqs / queue.py View on Github external
def count(self, page_size=10, vtimeout=10, callback=None,
              _attr='ApproximateNumberOfMessages'):
        return self.get_attributes(
            _attr, callback=transform(
                self._coerce_field_value, callback, _attr, int,
            ),
github celery / kombu / kombu / asynchronous / aws / connection.py View on Github external
def get_list(self, operation, params, markers, path='/', parent=None, verb='POST', callback=None):  # noqa
        return self.make_request(
            operation, params, path, verb,
            callback=transform(
                self._on_list_ready, callback, parent or self, markers,
                operation
            ),
github celery / kombu / kombu / asynchronous / aws / sqs / queue.py View on Github external
def read(self, visibility_timeout=None, wait_time_seconds=None,
             callback=None):
        return self.get_messages(
            1, visibility_timeout,
            wait_time_seconds=wait_time_seconds,
            callback=transform(list_first, callback),
        )
github celery / kombu / kombu / asynchronous / aws / connection.py View on Github external
def get_status(self, operation, params, path='/', parent=None, verb='GET', callback=None):  # noqa
        return self.make_request(
            operation, params, path, verb,
            callback=transform(
                self._on_status_ready, callback, parent or self, operation
            ),
github celery / kombu / kombu / asynchronous / aws / sqs / queue.py View on Github external
def get_timeout(self, callback=None, _attr='VisibilityTimeout'):
        return self.get_attributes(
            _attr, transform(
                self._coerce_field_value, callback, _attr, int,
            ),
github celery / kombu / kombu / asynchronous / aws / connection.py View on Github external
def getresponse(self, callback=None):
        request = self.getrequest()
        request.then(transform(self.Response, callback))
        return self.http_client.add_request(request)
github celery / kombu / kombu / asynchronous / aws / connection.py View on Github external
def get_object(self, operation, params, path='/', parent=None, verb='GET', callback=None):  # noqa
        return self.make_request(
            operation, params, path, verb,
            callback=transform(
                self._on_obj_ready, callback, parent or self, operation
            ),
github celery / kombu / kombu / asynchronous / aws / sqs / queue.py View on Github external
def write(self, message, delay_seconds=None, callback=None):
        return self.connection.send_message(
            self, message.get_body_encoded(), delay_seconds,
            callback=transform(self._on_message_sent, callback, message),
        )