GroupOption#

class teamworksams.user_option.GroupOption(guess_col_type: bool = True, interactive_mode: bool = True, cache: bool = True)[source]#

Bases: object

Options for configuring group data export.

Customizes the behavior of get_group(), controlling data type inference, caching, and interactive feedback. Optimizes the group data retrieval process for performance and output formatting. See User and Group Management for combining group and user data.

Parameters:
  • guess_col_type (bool) – If True, infers column data types in the output pandas.DataFrame (e.g., string for group names), ensuring compatibility with operations like merging with get_user() results. Set to False to use default pandas types. Defaults to True.

  • interactive_mode (bool) – If True, prints status messages (e.g., “Retrieved 3 groups”) during execution, useful for interactive environments. Set to False for silent execution. Defaults to True.

  • cache (bool) – If True, reuses an existing AMSClient via get_client(), reducing API calls for multi-function workflows. Set to False for independent sessions. Defaults to True.

guess_col_type#

Indicates whether column type inference is enabled.

Type:

bool

interactive_mode#

Indicates whether interactive mode is enabled.

Type:

bool

cache#

Indicates whether caching is enabled.

Type:

bool

Examples

>>> from teamworksams import GroupOption
>>> option = GroupOption(
...     guess_col_type = True,
...     interactive_mode = True,
...     cache = False
... )
__init__(guess_col_type: bool = True, interactive_mode: bool = True, cache: bool = True)[source]#