Style fetchers with protocol support.


Bases: LowercaseStrEnum

URL schemes.

FILE = 'file'
GH = 'gh'
GITHUB = 'github'
HTTP = 'http'
HTTPS = 'https'
PY = 'py'
PYPACKAGE = 'pypackage'
class bool, cache_dir: Path, cache_option: str)[source]

Bases: object

Manager that controls which fetcher to be used given a protocol.

cache_dir: Path
cache_option: str
fetch(url: furl) str | None[source]

Determine which fetcher to be used and fetch from it.

Returns None when offline is True and the fetcher would otherwise require a connection.

fetchers: dict[str, StyleFetcher]
normalize_url(url: str | furl, base: furl) furl[source]

Normalize a style URL.

The URL is made absolute against base, then passed to individual fetchers to produce a canonical version of the URL.

offline: bool
schemes: tuple[str]
session: CachedSession