def sort(self, name, start=None, num=None, by=None, get=None,<EOL>desc=False, alpha=False, store=None, groups=False):
with self.pipe as pipe:<EOL><INDENT>res = pipe.sort(self.redis_key(name), start=start, num=num,<EOL>by=by, get=get, desc=desc, alpha=alpha,<EOL>store=store, groups=groups)<EOL>if store:<EOL><INDENT>return res<EOL><DEDENT>f = Future()<EOL>def cb():<EOL><INDENT>decode = self.valueparse.decode<EOL>f.set([decode(v) for v in res.result])<EOL><DEDENT>pipe.on_execute(cb)<EOL>return f<EOL><DEDENT>
Sort and return the list, set or sorted set at ``name``.

``start`` and ``num`` allow for paging through the sorted data

``by`` allows using an external key to weight and sort the items.
    Use an "*" to indicate where in the key the item value is located

``get`` allows for returning items from external keys rather than the
    sorted data itself.  Use an "*" to indicate where int he key
    the item value is located

``desc`` allows for reversing the sort

``alpha`` allows for sorting lexicographically rather than numerically

``store`` allows for storing the result of the sort into
    the key ``store``

``groups`` if set to True and if ``get`` contains at least two
    elements, sort will return a list of tuples, each containing the
    values fetched from the arguments to ``get``.