scitacean.datablock.OrigDatablock#
- class scitacean.datablock.OrigDatablock(checksum_algorithm=None, init_files=None, _access_groups=None, _created_at=None, _created_by=None, _id=None, _is_published=None, _updated_at=None, _updated_by=None)[source]#
Dataclass for an orig datablock.
Instances of this class are mutable as opposed to
scitacean.model.OrigDatablock
. They are used for building datasets and get converted to/from pydantic models for communication with a server.Constructors
__init__
([checksum_algorithm, init_files, ...])Methods
add_files
(*files)Append files to the datablock.
from_download_model
(orig_datablock_model)Construct a new OrigDatablock from pydantic models.
Build a new pydantic model to upload this datablock.
Attributes
Access groups for this datablock.
checksum_algorithm
Creation time of this orig datablock.
User who created this orig datablock.
ID of this datablock.
Iterator over all files.
init_files
Return whether the datablock is public on SciCat.
Total size of all files.
Last update time of this orig datablock.
User who last updated this datablock.
- __init__(checksum_algorithm=None, init_files=None, _access_groups=None, _created_at=None, _created_by=None, _id=None, _is_published=None, _updated_at=None, _updated_by=None)#
- classmethod from_download_model(orig_datablock_model)[source]#
Construct a new OrigDatablock from pydantic models.
- Parameters:
orig_datablock_model (
DownloadOrigDatablock
) – Model of the orig datablock to construct.- Returns:
OrigDatablock
– A new instance.
- make_upload_model()[source]#
Build a new pydantic model to upload this datablock.
- Returns:
UploadOrigDatablock
– A new model for this orig datablock.