celery.datastructures
class celery.datastructures.AttributeDict[源代码]
Dict subclass with attribute access.
class celery.datastructures.AttributeDictMixin
Augment classes with a Mapping interface by adding attribute access.
I.e. d.key -> d[key].
class celery.datastructures.DictAttribute(obj)[源代码]
Dict interface to attributes.
obj[k] -> obj.k obj[k] = val -> obj.k = val
get(key, default=None)
items()[源代码]
iteritems()
iterkeys()
itervalues()
keys()
obj = None
values()
class celery.datastructures.ConfigurationView(changes, defaults)[源代码]
A view over an applications configuration dicts.
Custom (but older) version of .
If the key does not exist in changes, the defaults dicts are consulted.
add_defaults(d)[源代码]
changes = None
-
Remove all changes, but keep defaults.
defaults = None
first(\keys*)
get(key, default=None)[源代码]
items()
iteritems()
iterkeys()
itervalues()
keys()[源代码]
setdefault(key, default)
update(\args, **kwargs*)[源代码]
values()
class celery.datastructures.ExceptionInfo(exc_info=None, internal=False)
Exception wrapping an exception and its traceback.
exception = None
Exception instance.
internal = False
Set to true if this is an internal error.
traceback = None
String representation of the traceback.
type = None
class celery.datastructures.LimitedSet(maxlen=None, expires=None, data=None, heap=None)[源代码]
Kind-of Set with limitations.
Good for when you need to test for membership (a in set), but the list might become to big.
add(value, now=<built-in function time>)
Add a new member.
as_dict()[源代码]
clear()
Remove all members
discard(value)
Remove membership by finding value.
pop_value(value)[源代码]
Remove membership by finding value.
purge(limit=None, offset=0, now=<built-in function time>)
Purge expired items.
update(other, heappush=<built-in function heappush>)
class celery.datastructures.LRUCache(limit=None)
LRU Cache implementation using a doubly linked list to track access.
incr(key, delta=1)
items()
iteritems()
iterkeys()
itervalues()
keys()
values()