parent_class package

Submodules

parent_class.ParentClass module

class parent_class.ParentClass.ParentClass(class_type='')[source]

Bases: object

format_string_by_atts(string, **kwargs) str[source]
get_attr(att_string: str) Any[source]

returns self.<att_string>

get_atts(atts: str) List[Any][source]

returns all values of atts for class instance

has_attr(att: str) bool[source]

returns True/False whether the instance has the attribute

has_atts(atts: List[str]) List[bool][source]

returns a list of True/False indicating whether the class has each attribute

print_all_atts(**override_kwargs)[source]

Print off all Class instance attributes

print_atts(how: str = 'imp', **kwargs)[source]

Print attributes of the class off, if not printed off, the string will be returned

print_class_type(print_off: bool = True)[source]

Shows information about what type of class self is

print_imp_atts(**override_kwargs)[source]

Prints off (or returns a string) with the ‘important’ information about a class Most child classes will redefine this method with custom attributes to print off

print_one_line_atts(**override_kwargs)[source]

Prints off (or returns a string) with information about a class in one line Most child classes will redefine this method with custom attributes to print off

print_string(string: str, print_off: bool = True) Any[source]

Function does one of two things 1. Prints off the string and returns NOne 2. Returns the string

run_method(method_name, *method_args, **method_kwargs)[source]

runs method_name associated with self and given *args and **kwargs, returns whatever the method_pointer returns

set_attr(att: str, val: Any) None[source]

sets self.att = val

set_atts(dictionary: dict) None[source]

sets attributes of the class equal to the dictionary values

parent_class.ParentPlural module

class parent_class.ParentPlural.ParentPlural(att=None, **kwargs)[source]

Bases: ParentClass

DEFAULT_KWARGS = {'MAX_PRINT_ATTS': 10}
get_random()[source]
print_imp_atts(print_off=True, max_print_atts: int = -1)[source]

Prints off (or returns a string) with the ‘important’ information about a class Most child classes will redefine this method with custom attributes to print off

print_one_line_atts(print_off=True, leading_string='\t')[source]

Prints off (or returns a string) with information about a class in one line Most child classes will redefine this method with custom attributes to print off

user_select()[source]
user_select_multiple()[source]

parent_class.ParentPluralDict module

class parent_class.ParentPluralDict.ParentPluralDict(att='dict')[source]

Bases: ParentPlural

get_dict()[source]
set_dict(dict)[source]

parent_class.ParentPluralList module

class parent_class.ParentPluralList.ParentPluralList(att='list')[source]

Bases: ParentPlural

get_list()[source]
set_list(list)[source]

Module contents