arxiv.canonical.services.remote module¶
-
class
arxiv.canonical.services.remote.
DeferredRequestReader
(method, uri, stream=True)[source]¶ Bases:
_io.BytesIO
IO[bytes] object that reads lazily via an HTTP request.
-
seek
(offset, whence=0)[source]¶ Change stream position.
- Seek to byte offset pos relative to position indicated by whence:
0 Start of stream (the default). pos should be >= 0; 1 Current position - pos may be negative; 2 End of stream - pos usually negative.
Returns the new absolute position.
- Return type
None
-
-
class
arxiv.canonical.services.remote.
RemoteSource
(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.core.ICanonicalSource
Retrieves content from remote URIs.