Base
Base implementation.
Base
Bases: ABC
Base.
Attributes:
| Name | Type | Description |
|---|---|---|
input_count |
int
|
number of entry data. |
keys |
Set[str]
|
set of keys for which we calculate and represent statistics. |
key_data |
Any
|
data structure for saving key data. |
key_stats |
Any
|
data structure for calculating key statistics. |
Source code in pytry/general/base.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
__init__(input_func, default_count)
abstractmethod
Given input_func; Inits Base attributes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_func |
Any
|
A function for generating input data. |
required |
default_count |
Optional[int]
|
default number of keys if input_count is not specified. |
required |
Source code in pytry/general/base.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
__repr__()
Given key_stats; create key_stats representation for all keys.
Source code in pytry/general/base.py
48 49 50 | |
get_input_count(input_func)
staticmethod
get_input_count.
Source code in pytry/general/base.py
37 38 39 40 41 42 43 44 45 46 | |
main()
abstractmethod
Given key_data from the input; calculates key_stats.
Source code in pytry/general/base.py
60 61 62 | |
update_stats(key_stats, key)
abstractmethod
Update stats of a key for a single row.
Returns:
| Type | Description |
|---|---|
Any
|
updated stats for each key |
Source code in pytry/general/base.py
52 53 54 55 56 57 58 | |