arxiv.canonical.classic.content module

Functions for resolving classic content.

TODO: really need to cache stuff here.

class arxiv.canonical.classic.content.RemoteSourceWithHead(trusted_domain, trusted_scheme='https', retry=3, backoff=2, retry_status=5, force_retry_on=(<HTTPStatus.INTERNAL_SERVER_ERROR: 500>, <HTTPStatus.BAD_GATEWAY: 502>, <HTTPStatus.SERVICE_UNAVAILABLE: 503>, <HTTPStatus.GATEWAY_TIMEOUT: 504>))[source]

Bases: arxiv.canonical.services.remote.RemoteSource

head(key, content_type)[source]
Return type

Optional[CanonicalFile]

arxiv.canonical.classic.content.get_formats(dpath, ps_cache_path, ident, source_type, source, cf_cache=None)[source]

Get the dissemination formats for a version.

Return type

Iterable[CanonicalFile]

arxiv.canonical.classic.content.get_source(data, ident)[source]

Get the source file for a version from classic.

Return type

CanonicalFile

arxiv.canonical.classic.content.get_source_path(dpath, ident)[source]
Return type

str