utilities
Misc. utilities for the iam_bindings module.
Combinable
Bases: Protocol
Interface defining methods needed for a class to be passed to combine_and_maximize.
Source code in dapla_team_cli/tf/iam_bindings/utilities.py
44 45 46 47 48 49 50 51 52 53 54 |
|
identifier()
The "grouping variable", for example RoleIAMConfig.name to group roles by name.
Source code in dapla_team_cli/tf/iam_bindings/utilities.py
48 49 50 |
|
sorter()
The "sorting variable", for example RoleIAMConfig.expiry to sort roles by expiry date.
Source code in dapla_team_cli/tf/iam_bindings/utilities.py
52 53 54 |
|
Comparable
Bases: Protocol
Interface for classes that support igroupby.
Source code in dapla_team_cli/tf/iam_bindings/utilities.py
15 16 17 18 19 20 21 22 23 24 25 |
|
__eq__(__o)
The equals magic method.
Source code in dapla_team_cli/tf/iam_bindings/utilities.py
23 24 25 |
|
__lt__(__o)
The less than magic method.
Source code in dapla_team_cli/tf/iam_bindings/utilities.py
19 20 21 |
|
combine_and_maximize(t_list)
Combine and choose the item with the max U.sorter value for items with the same U.identifier.
Source code in dapla_team_cli/tf/iam_bindings/utilities.py
60 61 62 63 64 65 66 67 |
|
igroupby(seq, key)
Helper function to bypass some annoyances with itertools.groupby.
- groupby does not automatically sort the sequence given to it
- groupby returns an iterator
This helper function sorts the sequence and returns a dictionary with list values.
Source code in dapla_team_cli/tf/iam_bindings/utilities.py
32 33 34 35 36 37 38 39 40 41 |
|