syn.base.b package¶
Submodules¶
syn.base.b.base module¶
-
class
syn.base.b.base.
Base
(**kwargs)¶ Bases:
object
Class Options:
- args: ()
- autodoc: True
- coerce_args: False
- id_equality: False
- init_validate: False
- make_hashable: False
- make_type_object: True
- optional_none: False
- register_subclasses: False
- repr_template:
- coerce_hooks: ()
- create_hooks: ()
- init_hooks: ()
- init_order: ()
- metaclass_lookup: (‘coerce_hooks’, ‘init_hooks’, ‘create_hooks’, ‘setstate_hooks’)
- setstate_hooks: ()
-
classmethod
coerce
(value, **kwargs)¶
-
copy
(**kwargs)¶
-
classmethod
from_mapping
(value)¶
-
classmethod
from_object
(obj)¶
-
classmethod
from_sequence
(seq)¶
-
istr
(pretty=False, indent=0, toplevel=False)¶ Returns a string that, if evaluated, produces an equivalent object.
-
pretty
(indent=0)¶ Returns a pretty-printed version if istr().
-
to_dict
(**kwargs)¶ Convert the object into a dict of its declared attributes.
May exclude certain attribute groups by listing them in exclude=[].
May include certain attribute groups (to the exclusion of all others) by listing them in include=[].
-
to_tuple
(**kwargs)¶ Convert the object into a tuple of its declared attribute values.
-
validate
()¶ Raise an exception if the object is missing required attributes, or if the attributes are of an invalid type.
-
class
syn.base.b.base.
BaseType
(obj)¶ Bases:
syn.types.a.base.Type
-
attrs
(**kwargs)¶
-
-
syn.base.b.base.
init_hook
(f)¶
-
syn.base.b.base.
coerce_hook
(f)¶
-
syn.base.b.base.
setstate_hook
(f)¶
-
class
syn.base.b.base.
Harvester
¶ Bases:
object
syn.base.b.meta module¶
-
class
syn.base.b.meta.
Attr
(*args, **kwargs)¶ Bases:
syn.base.a.base.Base
-
class
syn.base.b.meta.
Attrs
(*args, **kwargs)¶ Bases:
syn.base.a.meta.Attrs
-
class
syn.base.b.meta.
Meta
(clsname, bases, dct)¶ Bases:
syn.base.a.meta.Meta
-
groups_enum
()¶ Returns an enum-ish dict with the names of the groups defined for this class.
-
-
class
syn.base.b.meta.
Data
¶ Bases:
object
-
syn.base.b.meta.
create_hook
(f)¶
-
syn.base.b.meta.
pre_create_hook
(*args, **kwargs)¶
-
class
syn.base.b.meta.
This
¶
-
syn.base.b.meta.
preserve_attr_data
(A, B)¶ Preserve attr data for combining B into A.
syn.base.b.utils module¶
-
class
syn.base.b.utils.
Counter
(**kwargs)¶ Bases:
syn.base.b.base.Base
Keyword-Only Arguments:
- initial_value: int | float
- The initial value to which the counter is reset
- resets: list
- A list of counters to reset when this counter is reset
- step (default = 1): int | float
- Amount by which to increment the counter
- threshold [Optional]: int | float
- Threshold at which to reset the counter
- value (default = -1): int | float
- The current count
Class Options:
- args: ()
- autodoc: True
- coerce_args: False
- id_equality: False
- init_validate: True
- make_hashable: False
- make_type_object: True
- optional_none: True
- register_subclasses: False
- repr_template:
- coerce_hooks: ()
- create_hooks: ()
- init_hooks: ()
- init_order: ()
- metaclass_lookup: (‘coerce_hooks’, ‘init_hooks’, ‘create_hooks’, ‘setstate_hooks’)
- setstate_hooks: ()
Groups:
- _all: initial_value, resets, step, threshold, value
-
peek
()¶
-
reset
()¶
-
validate
()¶
syn.base.b.wrapper module¶
-
class
syn.base.b.wrapper.
ListWrapper
(**kwargs)¶ Bases:
syn.base.b.base.Base
,syn.base.b.base.Harvester
Keyword-Only Arguments:
- _list: list
- The wrapped list
Class Options:
- args: ()
- autodoc: True
- coerce_args: False
- id_equality: False
- init_validate: False
- make_hashable: False
- make_type_object: True
- max_len: None
- min_len: None
- optional_none: False
- register_subclasses: False
- repr_template:
- coerce_hooks: ()
- create_hooks: ()
- init_hooks: ()
- init_order: ()
- metaclass_lookup: (‘coerce_hooks’, ‘init_hooks’, ‘create_hooks’, ‘setstate_hooks’)
- setstate_hooks: ()
Groups:
- _all: _list
- copy_copy: _list
- _internal: _list
- str_exclude: _list
-
append
(item)¶
-
count
(item)¶
-
extend
(items)¶
-
index
(item)¶
-
insert
(index, item)¶
-
pop
(index=-1)¶
-
remove
(item)¶
-
reverse
()¶
-
sort
(*args, **kwargs)¶
-
validate
()¶