nitpick.style.fetchers.http module

Base HTTP fetcher, other fetchers can inherit from this to wrap http errors.

class nitpick.style.fetchers.http.HttpFetcher(cache_manager: cachy.cache_manager.CacheManager, cache_option: str, protocols: Tuple[str, ...] = ('http', 'https'), domains: Tuple[str, ...] = ())[source]

Bases: nitpick.style.fetchers.base.StyleFetcher

Fetch a style from an http/https server.

cache_manager: CacheManager
cache_option: str
domains: Tuple[str, ...] = ()
fetch(url) Tuple[Optional[pathlib.Path], str]

Fetch a style form cache or from a specific fetcher.

protocols: Tuple[str, ...] = ('http', 'https')
requires_connection = True