geodesic.boson.dataset.Dataset.share_files#
- Dataset.share_files(alias=None, description=None, ttl=None, create_new=False, pin_version=False, **extra_settings)[source]#
Creates a new share token for the
filesservicer to enable file downloads.- Parameters:
alias (str | None) – An alias/nickname for the token. This is used to help users find tokens.
description (str | None) – A description of the token. This is used to help users understand the token’s purpose.
ttl (timedelta | int | float | None) – The time in until the dataset’s token should expire. Either a timedelta object or seconds Defaults to -1 (no expiration) if not provided.
create_new (bool) – If True, will create a new token even if one already exists. If ttl is greater than 0, this will always create a new token.
pin_version (bool) – If True, will pin the version of the dataset to the token. This means that the token will always return the same version of the dataset, even if the dataset changes.
extra_settings – A dictionary of extra settings to pass to scope this token - if you don’t know what this is for, don’t set directly.
- Raises:
requests.HTTPError – If the user is not permitted to access the dataset or if an error occurred
- Returns:
a share token and its corresponding data
- Return type: