arxiv.canonical.manifest module

Defines the structure of manifest records, used to store integrity info.

class arxiv.canonical.manifest.Manifest[source]

Bases: dict

Structure of a manifest record.

class arxiv.canonical.manifest.ManifestDecoder(*args, **kwargs)[source]

Bases: json.decoder.JSONDecoder

JSON decoder for manifests.

object_hook(obj, **extra)[source]

Decode the manifest to domain types.

Return type

Any

class arxiv.canonical.manifest.ManifestEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]

Bases: json.encoder.JSONEncoder

JSON encoder for manifests.

encode(obj)[source]

Serialize manifest objects.

Return type

Any

unpack(obj)[source]

Convert manifests and their members to native Python types.

Return type

Any

class arxiv.canonical.manifest.ManifestEntry[source]

Bases: dict

Structure of a single entry in a manifest.

arxiv.canonical.manifest.checksum_from_manifest(manifest, key)[source]

Retrieve a checksum for a key from a manifest.

Return type

Optional[str]

arxiv.canonical.manifest.make_empty_manifest()[source]

Generate a new empty manifest.

Return type

Manifest