AttrDict (internal)#
Copyright (c) 2013 Brendan Curran-Johnson
- class qbittorrentapi._attrdict.AttrDict(*args, **kwargs)#
Bases:
dict,qbittorrentapi._attrdict.MutableAttrA dict that implements MutableAttr.
- class qbittorrentapi._attrdict.MutableAttr#
Bases:
qbittorrentapi._attrdict.Attr,collections.abc.MutableMappingA mixin class for a mapping that allows for attribute-style access of values.
- class qbittorrentapi._attrdict.Attr#
Bases:
collections.abc.MappingA mixin class for a mapping that allows for attribute-style access of values.
- A key may be used as an attribute if:
It is a string
It matches
^[A-Za-z][A-Za-z0-9_]*$(i.e., a public attribute)The key doesn’t overlap with any class attributes (for
Attr, those would beget,items,keys,values,mro, andregister).
If a value which is accessed as an attribute is a Sequence-type (and is not a string/bytes), it will be converted to a _sequence_type with any mappings within it converted to Attrs.
- NOTE:
This means that if _sequence_type is not None, then a sequence accessed as an attribute will be a different object than if accessed as an attribute than if it is accessed as an item.