scitacean.model.Attachment#

class scitacean.model.Attachment(*, caption, owner_group, access_groups=None, dataset_id=None, id=None, instrument_group=None, proposal_id=None, sample_id=None, thumbnail=None, _created_at=None, _created_by=None, _is_published=None, _updated_at=None, _updated_by=None)[source]#

Constructors

__init__(*, caption, owner_group[, ...])

Methods

download_model_type()

Return the download model type for this user model.

from_download_model(download_model)

Construct an instance from an associated SciCat download model.

make_upload_model()

Construct a SciCat upload model from self.

upload_model_type()

Return the upload model type for this user model.

Attributes

caption

owner_group

access_groups

dataset_id

id

instrument_group

proposal_id

sample_id

thumbnail

created_at

created_by

is_published

updated_at

updated_by

__init__(*, caption, owner_group, access_groups=None, dataset_id=None, id=None, instrument_group=None, proposal_id=None, sample_id=None, thumbnail=None, _created_at=None, _created_by=None, _is_published=None, _updated_at=None, _updated_by=None)#
classmethod download_model_type()[source]#

Return the download model type for this user model.

Return type:

type[DownloadAttachment]

classmethod from_download_model(download_model)[source]#

Construct an instance from an associated SciCat download model.

Return type:

Attachment

make_upload_model()[source]#

Construct a SciCat upload model from self.

Return type:

UploadAttachment

classmethod upload_model_type()[source]#

Return the upload model type for this user model.

Returns None if the model cannot be uploaded.

Return type:

type[UploadAttachment]