nitpick.style.fetchers.base module

Base class for fetchers that wrap inner fetchers with caching ability.

class nitpick.style.fetchers.base.StyleFetcher(cache_manager: cachy.cache_manager.CacheManager, cache_option: str, protocols: Tuple[str, ...] = (), domains: Tuple[str, ...] = ())[source]

Bases: object

Base class of all fetchers, it encapsulate get/fetch from cache.

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

Fetch a style form cache or from a specific fetcher.

protocols: Tuple[str, ...] = ()
requires_connection = False