scitacean.Profile#

class scitacean.Profile(url, file_transfer)[source]#

Parameters for connecting to a specific instance of SciCat.

The fields of a profile correspond to the arguments of the constructors of Client. They can be overridden by the explicit constructor arguments.

When constructing a client from a profile, the profile argument may be one of:

  • If profile is a Profile, it is returned as is.

  • If profile is a pathlib.Path, a profile is loaded from the file at that path.

  • If profile is a str
    • and profile matches the name of a builtin profile, that profile is returned.

    • Otherwise, a profile is loaded from a file with this path, potentially by appending ".profile.toml" to the name.

Constructors

__init__(url, file_transfer)

Attributes

url

URL of the SciCat API.

file_transfer

A file transfer object for uploading and downloading files.

__init__(url, file_transfer)#
file_transfer: FileTransfer | None#

A file transfer object for uploading and downloading files.

See the File transfer. section for implementations provided by Scitacean.

url: str#

URL of the SciCat API.

Note that this is the URL to the API, not the web interface. For example, at ESS, the web interface URL is "https://scicat.ess.eu". But the API URL is "https://scicat.ess.eu/api/v3" (at the time of writing).