benchling_sdk.services.v2.stable.file_service module¶

class FileService¶

Bases: benchling_sdk.services.v2.base_service.BaseService

Files.

Files are Benchling objects that represent files and their metadata. Compared to Blobs, which are used by most Benchling products for attachments, Files are primarily used in the Analysis and Connect product.

See https://benchling.com/api/v2/reference#/Files

archive_files(file_ids: Iterable[str], reason: benchling_api_client.v2.stable.models.files_archive_reason.FilesArchiveReason) → benchling_api_client.v2.stable.models.files_archival_change.FilesArchivalChange¶

Archive Files.

See https://benchling.com/api/reference#/Files/archiveFiles

create(file: benchling_api_client.v2.stable.models.file_create.FileCreate) → benchling_api_client.v2.stable.models.file.File¶

Create a file.

See https://benchling.com/api/v2/reference#/Files/createFile

get_by_id(file_id: str) → benchling_api_client.v2.stable.models.file.File¶

Get a file.

See https://benchling.com/api/v2/reference#/Files/getFile

list(*, page_size: Optional[int] = 50, sort: Optional[ListFilesSort] = ListFilesSort.MODIFIEDAT, archive_reason: Optional[str] = None, created_at: Optional[str] = None, creator_ids: Optional[str] = None, folder_id: Optional[str] = None, mentioned_in: Optional[str] = None, modified_at: Optional[str] = None, name: Optional[str] = None, name_includes: Optional[str] = None, namesany_ofcase_sensitive: Optional[str] = None, namesany_of: Optional[str] = None, origin_ids: Optional[str] = None, ids: Optional[str] = None, display_ids: Optional[str] = None, returning: Optional[str] = None) → PageIterator[benchling_api_client.v2.stable.models.file.File]¶

List Files.

See https://benchling.com/api/v2/reference#/Files/listFiles

unarchive(file_ids: Iterable[str]) → benchling_api_client.v2.stable.models.files_archival_change.FilesArchivalChange¶

Unarchive one or more Files.

See https://benchling.com/api/reference#/Files/unarchiveFiles

update(file_id: str, file: benchling_api_client.v2.stable.models.file_update.FileUpdate) → benchling_api_client.v2.stable.models.file.File¶

Update a File.

See https://benchling.com/api/reference#/Files/updateFile