arxiv.canonical.record.version module

class arxiv.canonical.record.version.RecordDay(name, members, domain)[source]

Bases: arxiv.canonical.record.core.RecordBase

classmethod make_manifest_key(date)[source]

Make a key for a daily e-print manifest.

Returns

Return type

str

Return type

Key

class arxiv.canonical.record.version.RecordEPrint(name, members, domain)[source]

Bases: arxiv.canonical.record.core.RecordBase

classmethod make_key(idn)[source]

Make a key prefix for an e-print record.

Parameters

idn (str) – arXiv identifier

Returns

Return type

str

Return type

Key

classmethod make_manifest_key(ident)[source]

Make a key for an e-print manifest.

Returns

Return type

str

Return type

Key

class arxiv.canonical.record.version.RecordEPrints(name, members, domain)[source]

Bases: arxiv.canonical.record.core.RecordBase

classmethod make_manifest_key(_)[source]

Make a key for all e-print manifest.

Returns

Return type

str

Return type

Key

class arxiv.canonical.record.version.RecordMonth(name, members, domain)[source]

Bases: arxiv.canonical.record.core.RecordBase

classmethod make_manifest_key(year_and_month)[source]

Make a key for a monthly e-print manifest.

Returns

Return type

str

Return type

Key

class arxiv.canonical.record.version.RecordVersion(name, members, domain)[source]

Bases: arxiv.canonical.record.core.RecordBase

A collection of serialized components that make up a version record.

A version record is comprised of (1) a metadata record, (2) a source package, containing the original content provided by the submitter, and (3) a canonical rendering of the version (e.g. in PDF format).

The key prefix structure for an version record is:

` e-prints/<YYYY>/<MM>/<arXiv ID>/v<version>/ `

Where YYYY is the year and MM the month during which the first version of the e-print was announced.

Sub-keys are:

  • Metadata record: <arXiv ID>v<version>.json

  • Source package: <arXiv ID>v<version>.tar

  • PDF: <arXiv ID>v<version>.render

  • Manifest: <arXiv ID>v<version>.manifest.json

property formats

Dict[ContentType, RecordEntry[~_EDomain]]

Type

rtype

classmethod from_domain(version, dereferencer, metadata=None)[source]

Serialize an Version to an RecordVersion.

Return type

RecordVersion

property identifier

VersionedIdentifier

Type

rtype

instance_to_domain()[source]

Deserialize an RecordVersion to an Version.

Return type

Version

classmethod make_key(identifier, filename=None)[source]
Return type

Key

classmethod make_manifest_key(ident)[source]

Generate a full key that can be used to store a manifest.

Return type

Key

classmethod make_prefix(ident)[source]

Make a key prefix for an e-print record.

Parameters
  • date (datetime.date) – The day on which the first version of the e-print was announced.

  • ident (str) – arXiv identifier

Returns

Return type

str

Return type

str

property metadata

JSON document containing canonical e-print metadata.

Return type

RecordMetadata

property render

Canonical PDF for the e-print.

Return type

Optional[RecordEntry[~_EDomain]]

property source

Gzipped tarball containing the e-print source.

Return type

RecordEntry[~_EDomain]

class arxiv.canonical.record.version.RecordYear(name, members, domain)[source]

Bases: arxiv.canonical.record.core.RecordBase

classmethod make_manifest_key(year)[source]

Make a key for a yearly e-print manifest.

Returns

Return type

str

Return type

Key