roboto.domain.collections.collection#

Module Contents#

class roboto.domain.collections.collection.Collection(record, roboto_client=None)#

A higher-level container for grouping datasets together. Collections can also be used to group files from several distinct datasets together.

Parameters:
add_dataset(dataset_id)#
Parameters:

dataset_id (str)

Return type:

Collection

add_event(event_id)#
Parameters:

event_id (str)

Return type:

Collection

add_file(file_id)#
Parameters:

file_id (str)

Return type:

Collection

changes(from_version=None, to_version=None)#
Parameters:
  • from_version (Optional[int])

  • to_version (Optional[int])

Return type:

collections.abc.Generator[roboto.domain.collections.record.CollectionChangeRecord, None, None]

clear_custom_field(name)#

Clear a single custom-field value on this collection to None.

Parameters:

name (str)

Return type:

Collection

clear_custom_fields(names)#

Clear multiple custom-field values on this collection to None.

Parameters:

names (collections.abc.Sequence[str])

Return type:

Collection

property collection_id: str#
Return type:

str

classmethod create(description=None, name=None, resource_type=CollectionResourceType.File, resources=None, dataset_ids=None, event_ids=None, file_ids=None, tags=None, custom_fields=None, roboto_client=None, caller_org_id=None)#
Parameters:
Return type:

Collection

property created: datetime.datetime#
Return type:

datetime.datetime

property created_by: str#
Return type:

str

property custom_fields: dict[str, Any]#

Custom-field values defined on Collections in this org.

Every Ready CustomField defined for (org_id, Collection) appears as a key. Values that have not been set on this collection surface as None rather than being absent. Empty when no custom fields are defined for the org.

Return type:

dict[str, Any]

property datasets: list[str]#
Return type:

list[str]

delete()#
edit_access(edit)#
Parameters:

edit (roboto.auth.EditAccessRequest)

Return type:

roboto.auth.GetAccessResponse

property events: list[str]#
Return type:

list[str]

property files: list[str]#
Return type:

list[str]

classmethod from_id(collection_id, version=None, content_mode=CollectionContentMode.Full, roboto_client=None)#
Parameters:
Return type:

Collection

get_access()#
Return type:

roboto.auth.GetAccessResponse

classmethod list_all(roboto_client=None, owner_org_id=None, content_mode=CollectionContentMode.SummaryOnly, sort_by=None, sort_direction=None)#
Parameters:
Return type:

collections.abc.Generator[Collection, None, None]

property record: roboto.domain.collections.record.CollectionRecord#
Return type:

roboto.domain.collections.record.CollectionRecord

remove_dataset(dataset_id)#
Parameters:

dataset_id (str)

Return type:

Collection

remove_event(event_id)#
Parameters:

event_id (str)

Return type:

Collection

remove_file(file_id)#
Parameters:

file_id (str)

Return type:

Collection

set_custom_field(name, value)#

Set a single custom-field value on this collection.

name must be the name of a Ready custom field for this collection’s org and the Collection entity type; value must satisfy the field’s declared type.

Parameters:
  • name (str)

  • value (Any)

Return type:

Collection

set_custom_fields(fields)#

Set or overwrite multiple custom-field values on this collection.

Each key must name a Ready custom field for this collection’s org and the Collection entity type; each value must satisfy the field’s declared type.

Parameters:

fields (dict[str, Any])

Return type:

Collection

update(add_resources=NotSet, add_tags=NotSet, description=NotSet, name=NotSet, remove_resources=NotSet, remove_tags=NotSet, custom_fields_changeset=None)#
Parameters:
Return type:

Collection

property updated: datetime.datetime#
Return type:

datetime.datetime

property updated_by: str#
Return type:

str