arxiv.canonical.services.repository module

class arxiv.canonical.services.repository.RemoteRepository(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

Retrieves content from a remote arXiv repository.

can_resolve(uri)[source]

Indicate whether or not the implementation can resolve an URI.

Parameters

uri (D.URI) –

Returns

Return type

bool

Return type

bool

load(key, stream=True)[source]

Make an IO that waits to load from the record until it is read().

Return type

IO[bytes]

load_entry(key)[source]

Load an entry from the record.

Return type

Tuple[RecordStream, str]