typerig.core.objects.collection
typerig.core.objects.collection (version 0.28.6)
# MODULE: TypeRig / Core / Collection (Objects) # ----------------------------------------------------------- # (C) Vassil Kateliev, 2018-2020 (http://www.kateliev.com) # (C) Karandash Type Foundry (http://www.karandash.eu) #------------------------------------------------------------ # www.typerig.com
Modules
- json
Classes
- abcoll.MutableMapping(_abcoll.Mapping)
- _abcoll.MutableSequence(_abcoll.Sequence)
- collections.defaultdict(__builtin_.dict)
- json.decoder.JSONDecoder(builtin.object)
- json.encoder.JSONEncoder(builtin.object)
class CustomDict(_abcoll.MutableMapping)
A more or less complete user-defined wrapper around dictionary objects. Adapted from Source: https://github.com/enthought/Python-2.7.3/blob/master/Lib/self.__class__.py
Methods
- cmp(self, dict)
- contains(self, key)
- delitem(self, key)
- getitem(self, key)
- init(self, dict=None, **kwargs)
- iter(self)
- len(self)
- repr(self)
- setitem(self, key, item)
- clear(self)
- copy(self)
- get(self, key, failobj=None)
- has_key(self, key)
- items(self)
- iteritems(self)
- iterkeys(self)
- itervalues(self)
- keys(self)
- pop(self, key, *args)
- popitem(self)
- setdefault(self, key, failobj=None)
- update(self, dict=None, **kwargs)
- values(self)
Class methods
- fromkeys(cls, iterable, value=None) from abc.ABCMeta
Attributes
- abstractmethods = frozenset([])
- hash = None
Methods from abcoll.Mapping
- __eq_(self, other)
- ne(self, other)
Class methods from abcoll.Sized
- __subclasshook_(cls, C) from abc.ABCMeta
Descriptors from abcoll.Sized
- __dict_
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Attributes from abcoll.Sized
- __metaclass_ = <class 'abc.ABCMeta'>
-
Metaclass for defining Abstract Base Classes (ABCs). Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).
class CustomList(_abcoll.MutableSequence)
A more or less complete user-defined wrapper around list objects. Adapted from Source: https://github.com/enthought/Python-2.7.3/blob/master/Lib/UserList.py
Methods
- add(self, other)
- cmp(self, other)
- contains(self, item)
- delitem(self, i)
- delslice(self, i, j)
- eq(self, other)
- ge(self, other)
- getitem(self, i)
- getslice(self, i, j)
- gt(self, other)
- iadd(self, other)
- imul(self, n)
- init(self, initlist=None)
- le(self, other)
- len(self)
- lt(self, other)
- mul(self, n)
- ne(self, other)
- radd(self, other)
- repr(self)
- setitem(self, i, item)
- setslice(self, i, j, other)
- append(self, item)
- count(self, item)
- extend(self, other)
- index(self, item, *args)
- insert(self, i, item)
- pop(self, i=-1)
- remove(self, item)
- reverse(self)
- sort(self, *args, **kwds)
Attributes
- abstractmethods = frozenset([])
- hash = None
Methods from abcoll.Sequence
- __iter_(self)
- reversed(self)
Class methods from abcoll.Sized
- __subclasshook_(cls, C) from abc.ABCMeta
Descriptors from abcoll.Sized
- __dict_
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Attributes from abcoll.Sized
- __metaclass_ = <class 'abc.ABCMeta'>
-
Metaclass for defining Abstract Base Classes (ABCs). Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).
class attribdict(collections.defaultdict)
Default dictionary where keys can be accessed as attributes.
- Method resolution order:
- attribdict
- collections.defaultdict
- builtin.dict
- builtin.object
Methods
- delattr(self, name)
- getattribute(self, name)
- hash(self)
- init(self, *args, **kwdargs)
- repr(self)
- setattr(self, name, value)
- contains(self, search, search_type=None)
-
Does the object contain ANY value or nested object with given name (search) Attributes: search (Str): Search string search_type (type) : Value type Returns: Bool
- dir(self)
- extract(self, search)
-
Pull all values of specified key (search) Attributes: search (Str): Search string Returns: generator
- factory(self, factory_type)
- lock(self)
- where(self, search, search_type=None)
-
Pull all objects that contain values of specified search. Attributes: search (Str): Search string search_type (type) : Value type Returns: generator
Descriptors
- dict
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Methods from collections.defaultdict
- missing(...)
-
__missing__(key) # Called by __getitem__ for missing key; pseudo-code: if self.default_factory is None: raise KeyError((key,)) self[key] = value = self.default_factory() return value
- reduce(...)
-
Return state information for pickling.
Descriptors from collections.defaultdict
- default_factory
-
Factory for default value called by __missing__().
Methods from builtin.dict
- contains(...)
-
D.__contains__(k) -> True if D has a key k, else False
- delitem(...)
-
x.__delitem__(y) <==> del x[y]
- getitem(...)
-
x.__getitem__(y) <==> x[y]
- setitem(...)
-
x.__setitem__(i, y) <==> x[i]=y
- sizeof(...)
-
D.__sizeof__() -> size of D in memory, in bytes
- fromkeys(...)
-
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v. v defaults to None.
- itervalues(...)
-
D.itervalues() -> an iterator over the values of D
- pop(...)
-
D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
-
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
- setdefault(...)
-
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
-
D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- viewvalues(...)
-
D.viewvalues() -> an object providing a view on D's values
Attributes from builtin.dict
- new = <built-in method new of type object>
-
T.__new__(S, ...) -> a new object with type S, a subtype of T
class biDict(CustomDict)
Bi-directioanl dictionary partly based on Basj answer st: https://stackoverflow.com/questions/3318625/efficient-bidirectional-hash-table-in-python
Methods
- delitem(self, key)
- init(self, *args, **kwargs)
- setitem(self, key, value)
Attributes
- abstractmethods = frozenset([])
Methods from CustomDict
- cmp(self, dict)
- contains(self, key)
- getitem(self, key)
- iter(self)
- len(self)
- repr(self)
- clear(self)
- copy(self)
- get(self, key, failobj=None)
- has_key(self, key)
- items(self)
- iteritems(self)
- iterkeys(self)
- itervalues(self)
- keys(self)
- pop(self, key, *args)
- popitem(self)
- setdefault(self, key, failobj=None)
- update(self, dict=None, **kwargs)
- values(self)
Class methods from CustomDict
- fromkeys(cls, iterable, value=None) from abc.ABCMeta
Attributes from CustomDict
- hash = None
Methods from abcoll.Mapping
- __eq_(self, other)
- ne(self, other)
Class methods from abcoll.Sized
- __subclasshook_(cls, C) from abc.ABCMeta
Descriptors from abcoll.Sized
- __dict_
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Attributes from abcoll.Sized
- __metaclass_ = <class 'abc.ABCMeta'>
-
Metaclass for defining Abstract Base Classes (ABCs). Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).
class dimList(CustomList)
Custom list object that supports multiple dimensions Example: a = dimList([[[1, 2, 3, 4], ['a', 'b', 'c', 'd']], [[5, 6, 7, 8], ['e', 'f', 'g', 'h']]]) print(a[0,1,2])
Methods
- getitem(self, *args)
- init(self, *args, **kwargs)
- setitem(self, *args)
Descriptors
- dim
Attributes
- abstractmethods = frozenset([])
Methods from CustomList
- add(self, other)
- cmp(self, other)
- contains(self, item)
- delitem(self, i)
- delslice(self, i, j)
- eq(self, other)
- ge(self, other)
- getslice(self, i, j)
- gt(self, other)
- iadd(self, other)
- imul(self, n)
- le(self, other)
- len(self)
- lt(self, other)
- mul(self, n)
- ne(self, other)
- radd(self, other)
- repr(self)
- rmul = mul(self, n)
- setslice(self, i, j, other)
- append(self, item)
- count(self, item)
- extend(self, other)
- index(self, item, *args)
- insert(self, i, item)
- pop(self, i=-1)
- remove(self, item)
- reverse(self)
- sort(self, *args, **kwds)
Attributes from CustomList
- hash = None
Methods from abcoll.Sequence
- __iter_(self)
- reversed(self)
Class methods from abcoll.Sized
- __subclasshook_(cls, C) from abc.ABCMeta
Descriptors from abcoll.Sized
- __dict_
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Attributes from abcoll.Sized
- __metaclass_ = <class 'abc.ABCMeta'>
-
Metaclass for defining Abstract Base Classes (ABCs). Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).
class extBiDict(CustomDict)
Bi-directioanl dictionary with lists for values
Methods
- delitem(self, key)
- init(self, *args, **kwargs)
- setitem(self, key, value)
Attributes
- abstractmethods = frozenset([])
Methods from CustomDict
- cmp(self, dict)
- contains(self, key)
- getitem(self, key)
- iter(self)
- len(self)
- repr(self)
- clear(self)
- copy(self)
- get(self, key, failobj=None)
- has_key(self, key)
- items(self)
- iteritems(self)
- iterkeys(self)
- itervalues(self)
- keys(self)
- pop(self, key, *args)
- popitem(self)
- setdefault(self, key, failobj=None)
- update(self, dict=None, **kwargs)
- values(self)
Class methods from CustomDict
- fromkeys(cls, iterable, value=None) from abc.ABCMeta
Attributes from CustomDict
- hash = None
Methods from abcoll.Mapping
- __eq_(self, other)
- ne(self, other)
Class methods from abcoll.Sized
- __subclasshook_(cls, C) from abc.ABCMeta
Descriptors from abcoll.Sized
- __dict_
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Attributes from abcoll.Sized
- __metaclass_ = <class 'abc.ABCMeta'>
-
Metaclass for defining Abstract Base Classes (ABCs). Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).
jsontree = class treeDict(collections.defaultdict)
Default dictionary where keys can be accessed as attributes. Light Version ---- Adapted from JsonTree by Doug Napoleone: https://github.com/dougn/jsontree
- Method resolution order:
- treeDict
- collections.defaultdict
- builtin.dict
- builtin.object
Methods
- getattribute(self, name)
- init(self, *args, **kwargs)
- repr(self)
- setattr(self, name, value)
Descriptors
- dict
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Methods from collections.defaultdict
- missing(...)
-
__missing__(key) # Called by __getitem__ for missing key; pseudo-code: if self.default_factory is None: raise KeyError((key,)) self[key] = value = self.default_factory() return value
- reduce(...)
-
Return state information for pickling.
Descriptors from collections.defaultdict
- default_factory
-
Factory for default value called by __missing__().
Methods from builtin.dict
- contains(...)
-
D.__contains__(k) -> True if D has a key k, else False
- delitem(...)
-
x.__delitem__(y) <==> del x[y]
- getitem(...)
-
x.__getitem__(y) <==> x[y]
- setitem(...)
-
x.__setitem__(i, y) <==> x[i]=y
- sizeof(...)
-
D.__sizeof__() -> size of D in memory, in bytes
- fromkeys(...)
-
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v. v defaults to None.
- itervalues(...)
-
D.itervalues() -> an iterator over the values of D
- pop(...)
-
D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
-
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
- setdefault(...)
-
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
-
D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- viewvalues(...)
-
D.viewvalues() -> an object providing a view on D's values
Attributes from builtin.dict
- hash = None
- new = <built-in method new of type object>
-
T.__new__(S, ...) -> a new object with type S, a subtype of T
class treeDict(collections.defaultdict)
Default dictionary where keys can be accessed as attributes. Light Version ---- Adapted from JsonTree by Doug Napoleone: https://github.com/dougn/jsontree
- Method resolution order:
- treeDict
- collections.defaultdict
- builtin.dict
- builtin.object
Methods
- getattribute(self, name)
- init(self, *args, **kwargs)
- repr(self)
- setattr(self, name, value)
Descriptors
- dict
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Methods from collections.defaultdict
- missing(...)
-
__missing__(key) # Called by __getitem__ for missing key; pseudo-code: if self.default_factory is None: raise KeyError((key,)) self[key] = value = self.default_factory() return value
- reduce(...)
-
Return state information for pickling.
Descriptors from collections.defaultdict
- default_factory
-
Factory for default value called by __missing__().
Methods from builtin.dict
- contains(...)
-
D.__contains__(k) -> True if D has a key k, else False
- delitem(...)
-
x.__delitem__(y) <==> del x[y]
- getitem(...)
-
x.__getitem__(y) <==> x[y]
- setitem(...)
-
x.__setitem__(i, y) <==> x[i]=y
- sizeof(...)
-
D.__sizeof__() -> size of D in memory, in bytes
- fromkeys(...)
-
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v. v defaults to None.
- itervalues(...)
-
D.itervalues() -> an iterator over the values of D
- pop(...)
-
D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
-
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
- setdefault(...)
-
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
-
D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- viewvalues(...)
-
D.viewvalues() -> an object providing a view on D's values
Attributes from builtin.dict
- hash = None
- new = <built-in method new of type object>
-
T.__new__(S, ...) -> a new object with type S, a subtype of T
class vfj_decoder(json.decoder.JSONDecoder)
VFJ (JSON) decoder class for deserializing to a jsontree object structure. ---- Parts adapted from JsonTree by Doug Napoleone: https://github.com/dougn/jsontree
- Method resolution order:
- vfj_decoder
- json.decoder.JSONDecoder
- builtin.object
Methods
- init(self, *args, **kwdargs)
Methods from json.decoder.JSONDecoder
- decode(self, s, _w=<built-in method match of _sre.SRE_Pattern object>)
-
Return the Python representation of ``s`` (a ``str`` or ``unicode`` instance containing a JSON document)
- raw_decode(self, s, idx=0)
-
Decode a JSON document from ``s`` (a ``str`` or ``unicode`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end.
Descriptors from json.decoder.JSONDecoder
- dict
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
class vfj_encoder(json.encoder.JSONEncoder)
VFJ (JSON) encoder class that serializes out jsontree object structures. ---- Parts adapted from JsonTree by Doug Napoleone: https://github.com/dougn/jsontree
- Method resolution order:
- vfj_encoder
- json.encoder.JSONEncoder
- builtin.object
Methods
- init(self, *args, **kwdargs)
- default(self, obj)
Methods from json.encoder.JSONEncoder
- encode(self, o)
-
Return a JSON string representation of a Python data structure. >>> JSONEncoder().encode({"foo": ["bar", "baz"]}) '{"foo": ["bar", "baz"]}'
- iterencode(self, o, _one_shot=False)
-
Encode the given object and yield each string representation as available. For example:: for chunk in JSONEncoder().iterencode(bigobject): mysocket.write(chunk)
Descriptors from json.encoder.JSONEncoder
- dict
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Attributes from json.encoder.JSONEncoder
- item_separator = ', '
- key_separator = ': '
CustomList
typerig.core.objects.collection.CustomList = class CustomList(_abcoll.MutableSequence)
A more or less complete user-defined wrapper around list objects. Adapted from Source: https://github.com/enthought/Python-2.7.3/blob/master/Lib/UserList.py
Methods
- __add__(self, other)
- __cmp__(self, other)
- __contains__(self, item)
- __delitem__(self, i)
- __delslice__(self, i, j)
- __eq__(self, other)
- __ge__(self, other)
- __getitem__(self, i)
- __getslice__(self, i, j)
- __gt__(self, other)
- __iadd__(self, other)
- __imul__(self, n)
- __init__(self, initlist=None)
- __le__(self, other)
- __len__(self)
- __lt__(self, other)
- __mul__(self, n)
- __ne__(self, other)
- __radd__(self, other)
- __repr__(self)
- __setitem__(self, i, item)
- __setslice__(self, i, j, other)
- append(self, item)
- count(self, item)
- extend(self, other)
- index(self, item, *args)
- insert(self, i, item)
- pop(self, i=-1)
- remove(self, item)
- reverse(self)
- sort(self, *args, **kwds)
Attributes
- __abstractmethods__ = frozenset([])
- __hash__ = None
Methods from _abcoll.Sequence
- __iter__(self)
- __reversed__(self)
Class methods from _abcoll.Sized
- __subclasshook__(cls, C) from abc.ABCMeta
Descriptors from _abcoll.Sized
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
Attributes from _abcoll.Sized
- __metaclass__ = <class 'abc.ABCMeta'>
-
Metaclass for defining Abstract Base Classes (ABCs). Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).
dimList
typerig.core.objects.collection.dimList = class dimList(CustomList)
Custom list object that supports multiple dimensions Example: a = dimList([[[1, 2, 3, 4], ['a', 'b', 'c', 'd']], [[5, 6, 7, 8], ['e', 'f', 'g', 'h']]]) print(a[0,1,2])
Methods
- __getitem__(self, *args)
- __init__(self, *args, **kwargs)
- __setitem__(self, *args)
Descriptors
- dim
Attributes
- __abstractmethods__ = frozenset([])
Methods from CustomList
- __add__(self, other)
- __cmp__(self, other)
- __contains__(self, item)
- __delitem__(self, i)
- __delslice__(self, i, j)
- __eq__(self, other)
- __ge__(self, other)
- __getslice__(self, i, j)
- __gt__(self, other)
- __iadd__(self, other)
- __imul__(self, n)
- __le__(self, other)
- __len__(self)
- __lt__(self, other)
- __mul__(self, n)
- __ne__(self, other)
- __radd__(self, other)
- __repr__(self)
- __rmul__ = __mul__(self, n)
- __setslice__(self, i, j, other)
- append(self, item)
- count(self, item)
- extend(self, other)
- index(self, item, *args)
- insert(self, i, item)
- pop(self, i=-1)
- remove(self, item)
- reverse(self)
- sort(self, *args, **kwds)
Attributes from CustomList
- __hash__ = None
Methods from _abcoll.Sequence
- __iter__(self)
- __reversed__(self)
Class methods from _abcoll.Sized
- __subclasshook__(cls, C) from abc.ABCMeta
Descriptors from _abcoll.Sized
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
Attributes from _abcoll.Sized
- __metaclass__ = <class 'abc.ABCMeta'>
-
Metaclass for defining Abstract Base Classes (ABCs). Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).
CustomDict
typerig.core.objects.collection.CustomDict = class CustomDict(_abcoll.MutableMapping)
A more or less complete user-defined wrapper around dictionary objects. Adapted from Source: https://github.com/enthought/Python-2.7.3/blob/master/Lib/self.__class__.py
Methods
- __cmp__(self, dict)
- __contains__(self, key)
- __delitem__(self, key)
- __getitem__(self, key)
- __init__(self, dict=None, **kwargs)
- __iter__(self)
- __len__(self)
- __repr__(self)
- __setitem__(self, key, item)
- clear(self)
- copy(self)
- get(self, key, failobj=None)
- has_key(self, key)
- items(self)
- iteritems(self)
- iterkeys(self)
- itervalues(self)
- keys(self)
- pop(self, key, *args)
- popitem(self)
- setdefault(self, key, failobj=None)
- update(self, dict=None, **kwargs)
- values(self)
Class methods
- fromkeys(cls, iterable, value=None) from abc.ABCMeta
Attributes
- __abstractmethods__ = frozenset([])
- __hash__ = None
Methods from _abcoll.Mapping
- __eq__(self, other)
- __ne__(self, other)
Class methods from _abcoll.Sized
- __subclasshook__(cls, C) from abc.ABCMeta
Descriptors from _abcoll.Sized
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
Attributes from _abcoll.Sized
- __metaclass__ = <class 'abc.ABCMeta'>
-
Metaclass for defining Abstract Base Classes (ABCs). Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).
biDict
typerig.core.objects.collection.biDict = class biDict(CustomDict)
Bi-directioanl dictionary partly based on Basj answer st: https://stackoverflow.com/questions/3318625/efficient-bidirectional-hash-table-in-python
Methods
- __delitem__(self, key)
- __init__(self, *args, **kwargs)
- __setitem__(self, key, value)
Attributes
- __abstractmethods__ = frozenset([])
Methods from CustomDict
- __cmp__(self, dict)
- __contains__(self, key)
- __getitem__(self, key)
- __iter__(self)
- __len__(self)
- __repr__(self)
- clear(self)
- copy(self)
- get(self, key, failobj=None)
- has_key(self, key)
- items(self)
- iteritems(self)
- iterkeys(self)
- itervalues(self)
- keys(self)
- pop(self, key, *args)
- popitem(self)
- setdefault(self, key, failobj=None)
- update(self, dict=None, **kwargs)
- values(self)
Class methods from CustomDict
- fromkeys(cls, iterable, value=None) from abc.ABCMeta
Attributes from CustomDict
- __hash__ = None
Methods from _abcoll.Mapping
- __eq__(self, other)
- __ne__(self, other)
Class methods from _abcoll.Sized
- __subclasshook__(cls, C) from abc.ABCMeta
Descriptors from _abcoll.Sized
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
Attributes from _abcoll.Sized
- __metaclass__ = <class 'abc.ABCMeta'>
-
Metaclass for defining Abstract Base Classes (ABCs). Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).
extBiDict
typerig.core.objects.collection.extBiDict = class extBiDict(CustomDict)
Bi-directioanl dictionary with lists for values
Methods
- __delitem__(self, key)
- __init__(self, *args, **kwargs)
- __setitem__(self, key, value)
Attributes
- __abstractmethods__ = frozenset([])
Methods from CustomDict
- __cmp__(self, dict)
- __contains__(self, key)
- __getitem__(self, key)
- __iter__(self)
- __len__(self)
- __repr__(self)
- clear(self)
- copy(self)
- get(self, key, failobj=None)
- has_key(self, key)
- items(self)
- iteritems(self)
- iterkeys(self)
- itervalues(self)
- keys(self)
- pop(self, key, *args)
- popitem(self)
- setdefault(self, key, failobj=None)
- update(self, dict=None, **kwargs)
- values(self)
Class methods from CustomDict
- fromkeys(cls, iterable, value=None) from abc.ABCMeta
Attributes from CustomDict
- __hash__ = None
Methods from _abcoll.Mapping
- __eq__(self, other)
- __ne__(self, other)
Class methods from _abcoll.Sized
- __subclasshook__(cls, C) from abc.ABCMeta
Descriptors from _abcoll.Sized
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
Attributes from _abcoll.Sized
- __metaclass__ = <class 'abc.ABCMeta'>
-
Metaclass for defining Abstract Base Classes (ABCs). Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).
attribdict
typerig.core.objects.collection.attribdict = class attribdict(collections.defaultdict)
Default dictionary where keys can be accessed as attributes.
- Method resolution order:
- attribdict
- collections.defaultdict
- __builtin__.dict
- __builtin__.object
Methods
- __delattr__(self, name)
- __getattribute__(self, name)
- __hash__(self)
- __init__(self, *args, **kwdargs)
- __repr__(self)
- __setattr__(self, name, value)
- contains(self, search, search_type=None)
-
Does the object contain ANY value or nested object with given name (search) Attributes: search (Str): Search string search_type (type) : Value type Returns: Bool
- dir(self)
- extract(self, search)
-
Pull all values of specified key (search) Attributes: search (Str): Search string Returns: generator
- factory(self, factory_type)
- lock(self)
- where(self, search, search_type=None)
-
Pull all objects that contain values of specified search. Attributes: search (Str): Search string search_type (type) : Value type Returns: generator
Descriptors
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
Methods from collections.defaultdict
- __missing__(...)
-
__missing__(key) # Called by __getitem__ for missing key; pseudo-code: if self.default_factory is None: raise KeyError((key,)) self[key] = value = self.default_factory() return value
- __reduce__(...)
-
Return state information for pickling.
Descriptors from collections.defaultdict
- default_factory
-
Factory for default value called by __missing__().
Methods from __builtin__.dict
- __contains__(...)
-
D.__contains__(k) -> True if D has a key k, else False
- __delitem__(...)
-
x.__delitem__(y) <==> del x[y]
- __getitem__(...)
-
x.__getitem__(y) <==> x[y]
- __setitem__(...)
-
x.__setitem__(i, y) <==> x[i]=y
- __sizeof__(...)
-
D.__sizeof__() -> size of D in memory, in bytes
- fromkeys(...)
-
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v. v defaults to None.
- itervalues(...)
-
D.itervalues() -> an iterator over the values of D
- pop(...)
-
D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
-
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
- setdefault(...)
-
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
-
D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- viewvalues(...)
-
D.viewvalues() -> an object providing a view on D's values
Attributes from __builtin__.dict
- __new__ = <built-in method __new__ of type object>
-
T.__new__(S, ...) -> a new object with type S, a subtype of T
extract
- typerig.core.objects.collection.attribdict.extract = extract(self, search) unbound typerig.core.objects.collection.attribdict method
-
Pull all values of specified key (search) Attributes: search (Str): Search string Returns: generator
where
- typerig.core.objects.collection.attribdict.where = where(self, search, search_type=None) unbound typerig.core.objects.collection.attribdict method
-
Pull all objects that contain values of specified search. Attributes: search (Str): Search string search_type (type) : Value type Returns: generator
contains
- typerig.core.objects.collection.attribdict.contains = contains(self, search, search_type=None) unbound typerig.core.objects.collection.attribdict method
-
Does the object contain ANY value or nested object with given name (search) Attributes: search (Str): Search string search_type (type) : Value type Returns: Bool
treeDict
typerig.core.objects.collection.treeDict = class treeDict(collections.defaultdict)
Default dictionary where keys can be accessed as attributes. Light Version ---- Adapted from JsonTree by Doug Napoleone: https://github.com/dougn/jsontree
- Method resolution order:
- treeDict
- collections.defaultdict
- __builtin__.dict
- __builtin__.object
Methods
- __getattribute__(self, name)
- __init__(self, *args, **kwargs)
- __repr__(self)
- __setattr__(self, name, value)
Descriptors
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
Methods from collections.defaultdict
- __missing__(...)
-
__missing__(key) # Called by __getitem__ for missing key; pseudo-code: if self.default_factory is None: raise KeyError((key,)) self[key] = value = self.default_factory() return value
- __reduce__(...)
-
Return state information for pickling.
Descriptors from collections.defaultdict
- default_factory
-
Factory for default value called by __missing__().
Methods from __builtin__.dict
- __contains__(...)
-
D.__contains__(k) -> True if D has a key k, else False
- __delitem__(...)
-
x.__delitem__(y) <==> del x[y]
- __getitem__(...)
-
x.__getitem__(y) <==> x[y]
- __setitem__(...)
-
x.__setitem__(i, y) <==> x[i]=y
- __sizeof__(...)
-
D.__sizeof__() -> size of D in memory, in bytes
- fromkeys(...)
-
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v. v defaults to None.
- itervalues(...)
-
D.itervalues() -> an iterator over the values of D
- pop(...)
-
D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
-
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
- setdefault(...)
-
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
-
D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- viewvalues(...)
-
D.viewvalues() -> an object providing a view on D's values
Attributes from __builtin__.dict
- __hash__ = None
- __new__ = <built-in method __new__ of type object>
-
T.__new__(S, ...) -> a new object with type S, a subtype of T
treeDict
typerig.core.objects.collection.jsontree = class treeDict(collections.defaultdict)
Default dictionary where keys can be accessed as attributes. Light Version ---- Adapted from JsonTree by Doug Napoleone: https://github.com/dougn/jsontree
- Method resolution order:
- treeDict
- collections.defaultdict
- __builtin__.dict
- __builtin__.object
Methods
- __getattribute__(self, name)
- __init__(self, *args, **kwargs)
- __repr__(self)
- __setattr__(self, name, value)
Descriptors
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
Methods from collections.defaultdict
- __missing__(...)
-
__missing__(key) # Called by __getitem__ for missing key; pseudo-code: if self.default_factory is None: raise KeyError((key,)) self[key] = value = self.default_factory() return value
- __reduce__(...)
-
Return state information for pickling.
Descriptors from collections.defaultdict
- default_factory
-
Factory for default value called by __missing__().
Methods from __builtin__.dict
- __contains__(...)
-
D.__contains__(k) -> True if D has a key k, else False
- __delitem__(...)
-
x.__delitem__(y) <==> del x[y]
- __getitem__(...)
-
x.__getitem__(y) <==> x[y]
- __setitem__(...)
-
x.__setitem__(i, y) <==> x[i]=y
- __sizeof__(...)
-
D.__sizeof__() -> size of D in memory, in bytes
- fromkeys(...)
-
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v. v defaults to None.
- itervalues(...)
-
D.itervalues() -> an iterator over the values of D
- pop(...)
-
D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
-
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
- setdefault(...)
-
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
-
D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- viewvalues(...)
-
D.viewvalues() -> an object providing a view on D's values
Attributes from __builtin__.dict
- __hash__ = None
- __new__ = <built-in method __new__ of type object>
-
T.__new__(S, ...) -> a new object with type S, a subtype of T
vfj_decoder
typerig.core.objects.collection.vfj_decoder = class vfj_decoder(json.decoder.JSONDecoder)
VFJ (JSON) decoder class for deserializing to a jsontree object structure. ---- Parts adapted from JsonTree by Doug Napoleone: https://github.com/dougn/jsontree
- Method resolution order:
- vfj_decoder
- json.decoder.JSONDecoder
- __builtin__.object
Methods
- __init__(self, *args, **kwdargs)
Methods from json.decoder.JSONDecoder
- decode(self, s, _w=<built-in method match of _sre.SRE_Pattern object>)
-
Return the Python representation of ``s`` (a ``str`` or ``unicode`` instance containing a JSON document)
- raw_decode(self, s, idx=0)
-
Decode a JSON document from ``s`` (a ``str`` or ``unicode`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end.
Descriptors from json.decoder.JSONDecoder
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
vfj_encoder
typerig.core.objects.collection.vfj_encoder = class vfj_encoder(json.encoder.JSONEncoder)
VFJ (JSON) encoder class that serializes out jsontree object structures. ---- Parts adapted from JsonTree by Doug Napoleone: https://github.com/dougn/jsontree
- Method resolution order:
- vfj_encoder
- json.encoder.JSONEncoder
- __builtin__.object
Methods
- __init__(self, *args, **kwdargs)
- default(self, obj)
Methods from json.encoder.JSONEncoder
- encode(self, o)
-
Return a JSON string representation of a Python data structure. >>> JSONEncoder().encode({"foo": ["bar", "baz"]}) '{"foo": ["bar", "baz"]}'
- iterencode(self, o, _one_shot=False)
-
Encode the given object and yield each string representation as available. For example:: for chunk in JSONEncoder().iterencode(bigobject): mysocket.write(chunk)
Descriptors from json.encoder.JSONEncoder
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
Attributes from json.encoder.JSONEncoder
- item_separator = ', '
- key_separator = ': '