Configuration

Configuration options for Updater class

class tuf.ngclient.config.UpdaterConfig(max_root_rotations: int = 32, max_delegations: int = 32, root_max_length: int = 512000, timestamp_max_length: int = 16384, snapshot_max_length: int = 2000000, targets_max_length: int = 5000000, prefix_targets_with_hash: bool = True)

Bases: object

Used to store Updater configuration.

Parameters
  • max_root_rotations – The maximum number of root rotations.

  • max_delegations – The maximum number of delegations.

  • root_max_length – The maxmimum length of a root metadata file.

  • timestamp_max_length – The maximum length of a timestamp metadata file.

  • snapshot_max_length – The maximum length of a snapshot metadata file.

  • targets_max_length – The maximum length of a targets metadata file.

  • prefix_targets_with_hash – When consistent snapshots are used (see https://theupdateframework.github.io/specification/latest/#consistent-snapshots), #pylint: disable=line-too-long target download URLs are formed by prefixing the filename with a hash digest of file content by default. This can be overridden by setting prefix_targets_with_hash to False.

max_delegations: int = 32
max_root_rotations: int = 32
prefix_targets_with_hash: bool = True
root_max_length: int = 512000
snapshot_max_length: int = 2000000
targets_max_length: int = 5000000
timestamp_max_length: int = 16384