Snapshot class

class Snapshot(version, spec_version, expires, meta, unrecognized_fields=None)

A container for the signed part of snapshot metadata.

Snapshot contains information about all target Metadata files.

All parameters named below are not just constructor arguments but also instance attributes.

Parameters
  • version (int) – The metadata version number.

  • spec_version (str) – The supported TUF specification version number.

  • expires (datetime.datetime) – The metadata expiry date.

  • unrecognized_fields (Optional[Mapping[str, Any]]) – Dictionary of all unrecognized fields.

  • meta (Dict[str, MetaFile]) – A dictionary of target metadata filenames to MetaFile objects.

update(rolename, role_info)

Assigns passed (delegated) targets role info to meta dict.

Parameters
  • rolename (str) –

  • role_info (MetaFile) –

Return type

None