Skip to main content

Group

Represents a group in the Datagrok system. A group can be a collection of other groups, with hierarchical relationships defined through parent-child links. Groups can be personal, hidden, and have admin or non-admin members.

Attributes

NameTypeDescription
descriptionOptional[str]A description of the group's purpose.
personalbool, optionalWhether this is a personal group of the user (default is False).
hiddenbool, optionalWhether this group is hidden from the UI (default is False).
namestrInternal name of the model, used as an identifier.
idOptional[str]Unique identifier for the model instance. Can be None for new instances.
friendly_nameOptional[str]Human-readable name for display purposes. Defaults to None.
created_onOptional[datetime]Timestamp indicating when the model was created. Defaults to None.
updated_onOptional[datetime]Timestamp indicating when the model was last updated. Defaults to None.
namespaceOptional[str]Optional namespace prefix to distinguish models with the same name. Defaults to None.

Methods

__init__()

from_dict()

Internal method: create a Group from a dictionary (e.g., API response).

Parameters

NameTypeDescription
clientOptional[DatagrokClient]The client used to fetch related entities.
datadictGroup data in dictionary form.

Returns

TypeDescription
GroupThe deserialized Group object.

ALL_USERS()

DEVELOPERS()

TEST()

ADMIN()

SYSTEM()

ADMINISTRATORS()

members()

Get all non-admin members of this group.

Returns

TypeDescription
List[Group]List of non-admin member groups

admin_members()

Get all admin members of this group.

Returns

TypeDescription
List[Group]List of admin member groups

memberships()

Get all non-admin memberships of this group.

Returns

TypeDescription
List[Group]List of non-admin membership groups

admin_memberships()

Get all admin memberships of this group.

Returns

TypeDescription
List[Group]List of admin membership groups

add_member()

Adds a child group as a member of this group (in-memory only). Group should be save using client to actually add a member.

Parameters

NameTypeDescription
groupGroupThe group to add as a member
is_adminbool, optionalWhether the new member should have admin privileges, by default False

to_dict()

Convert the group to a dictionary representation.

Returns

TypeDescription
dictDictionary containing all group data

__repr__()