httk.core.datastream.bytestream_url

Classes

BytestreamURL

Backend for streaming byte data fetched from a URL string.

Module Contents

class httk.core.datastream.bytestream_url.BytestreamURL(url, **hints)

Bases: httk.core.datastream.bytestream_common.BytestreamCommon, httk.core.datastream.bytestream_backend.BytestreamBackend

Backend for streaming byte data fetched from a URL string. A bare string is interpreted as a URL when its scheme is one of http, https, ftp, or file, or when an explicit kind=”url” hint is given. Network access from an implicit bare network URL requires explicit consent before opening; URL views and kind="url" provide that consent. Content is transparently decompressed according to the compression hint.

Parameters:
  • url (str) – URL to fetch lazily when data is first read.

  • **hints (Any) – Backend-selection, consent, timeout, and compression hints.

Raises:

ValueError – If the compression hint is unknown.

property name: str | None

Report that a URL backend has no filename.

property url: str

Return the source URL.

property closed: bool

Report whether the URL backend is closed.