larry._utils._auto_parse_base_class

Module Contents

Classes

AutoParseBase

Helper class that provides a standard way to create an ABC using

class larry._utils._auto_parse_base_class.AutoParseBase

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

property _init_params
property _call_params
property _parse_params
property _collected_params
__call__()
__init_kwargs__()
_inspect(func)
_collect_literal_kwargs(kwargs_val)
__hide__(key)
__collect__(key, val)
__parse__(kwargs: dict, ignore: list = ['self'], private: list = ['ignore', 'private', 'public'], public: list = [], kwargs_key: str = 'kwargs')

Pass locals() or some other collection of kwargs to kwargs to save them as attributes of the subclass.

kwargs

typically locals() type: dict

ignore

type: list default: [“self”]

private

type: list default: [“ignore”, “private”, “public”]

public

type: list default: []

kwargs_key

type: str default: “kwargs”

  1. assumes all are public unless denoted in private

  2. If a public list is provided, all kwargs are shifted to private unless denoted in public.