MetadataMixin

class vidispine.metadata.MetadataMixin

Metadata

Metadata related requests for collections and items.

This class is not to be used directly. Methods are to be called via the Collection or Item class.

Vidispine doc reference

update_metadata(vidispine_id: str, metadata: dict)Dict[str, Any]

Sets or updates the metadata of an entity (collection or item).

Parameters
  • vidispine_id – The id of the entity.

  • metadata – the metadata to update the entity with.

Returns

JSON response from the request.

Return type

vidispine.typing.BaseJson.

Metadata Field

class vidispine.metadata.MetadataField(client)

Metadata fields

Metadata fields define name and type of fields for metadata.

Vidispine doc reference

create(metadata: dict, field_name: str)Dict[str, Any]

Creates a metadata field.

Parameters
  • metadata – The metadata to create the field with.

  • field_name – The name of the field to create.

Returns

JSON response from the request.

Return type

vidispine.typing.BaseJson.

delete(field_name: str)None

Deletes a metadata field.

Parameters

field_name – The name of the metadata field to delete.

get(field_name: str, params: Optional[dict] = None)Dict[str, Any]

Returns information about a specific metadata field.

Parameters
  • field_name – The name of the metadata field to get.

  • params – Optional query params.

Returns

JSON response from the request.

Return type

vidispine.typing.BaseJson.

list(params: Optional[dict] = None)Dict[str, Any]

Returns a list of all defined fields.

Parameters

params – Optional query params.

Returns

JSON response from the request.

Return type

vidispine.typing.BaseJson.

update(metadata: dict, field_name: str)Dict[str, Any]

Updates a metadata field.

Parameters
  • metadata – The metadata to update the field with.

  • field_name – The name of the field to update.

Returns

JSON response from the request.

Return type

vidispine.typing.BaseJson.

Metadata Field Group

class vidispine.metadata.MetadataFieldGroup(client)

Metadata field groups

Field groups are named sets of fields and groups.

Vidispine doc reference

add_field_to_group(field_group_name: str, field_name: str)None

Adds the field with the specified name to the group.

Parameters
  • field_group_name – The name of the field group to add the field to.

  • field_name – The name of the field to add.

  • params – Optional query parameters.

add_group_to_group(parent_group_name: str, child_group_name: str)None

Adds the group with the specified name to the group.

Parameters
  • parent_group_name – The name of the parent group.

  • child_group_name – The name of the child group to add.

create(field_group_name: str, params: Optional[dict] = None)None

Creates a new group with the given name.

Parameters
  • field_group_name – The name of the field group to create.

  • params – Optional query parameters.

delete(field_group_name: str)None

Deletes the group with the given name.

Parameters

field_group_name – The name of the field group to be deleted.

get(field_group_name: str, params: Optional[dict] = None)Dict[str, Any]

Retrieves the specified metadata field group.

Parameters
  • field_group_name – The name of the field group to get.

  • params – Optional query parameters.

Returns

JSON response from the request.

Return type

vidispine.typing.BaseJson.

list(params: Optional[dict] = None)Dict[str, Any]

Retrieves all groups known by the system.

Parameters

params – Optional query parameters.

Returns

JSON response from the request.

Return type

vidispine.typing.BaseJson.

remove_field_from_group(field_group_name: str, field_name: str)None

Removes the field with the specified name from the group.

Parameters
  • field_group_name – The name of the field group with the field to be deleted.

  • field_name – The name of the field to delete.

remove_group_from_group(parent_group_name: str, child_group_name: str)None

Removes the group with the specified name from the group.

Parameters
  • parent_group_name – The name of the parent group.

  • child_group_name – The name of the child group to remove.