API reference#

Classes#

Main classes#

Client(*, client, file_transfer)

SciCat client to communicate with a server.

Dataset(type[, access_groups, ...])

Metadata and linked data files for a measurement, simulation, or analysis.

File(local_path, remote_path, remote_gid, ...)

Store local and remote paths and metadata for a file.

File transfer#

transfer.link.LinkFileTransfer(*[, ...])

Upload / download files by creating symlinks.

transfer.sftp.SFTPFileTransfer(*, host[, ...])

Upload / download files using SFTP.

Auxiliary classes#

client.ScicatClient(url, token, timeout)

Low-level client to call the SciCat API.

datablock.OrigDatablock([...])

Dataclass for an orig datablock.

dataset.DatablockUploadModels(orig_datablocks)

Pydantic models for (orig) datablocks.

PID(*, pid[, prefix])

Stores the persistent identifier of a database item.

RemotePath(*path_segments)

A path on the remote filesystem.

Thumbnail(mime[, data, _encoded_data])

Encodes an image to be used as a thumbnail in SciCat.

DatasetType(value[, names, module, ...])

Type of Dataset.

Exceptions#

FileUploadError

Raised when file upload fails.

IntegrityError

Raised when a dataset or file is broken.

ScicatCommError

Raised when communication with SciCat fails.

ScicatLoginError

Raised when login to SciCat server fails.

Submodules#

model

Models for communication with SciCat and user facing dataclasses.

testing

Helpers for testing code with Scitacean.

typing

Definitions for type checking.

Miscellaneous#

filesystem.checksum_of_file(path, *, algorithm)

Compute the checksum of a local file.

filesystem.escape_path(path)

Escape disallowed characters for file paths.

filesystem.file_size(path)

Return the size of a local file in bytes.

filesystem.file_modification_time(path)

Return the time in UTC when a local file was last modified.

logging.logger_name()

Return the name of Scitacean's logger.

logging.get_logger()

Return the logger used by Scitacean.

util.formatter.DatasetPathFormatter()

Formatter that inserts dataset fields and escapes paths.