schema_salad.fetcher ==================== .. py:module:: schema_salad.fetcher .. autoapi-nested-parse:: Resource fetching. Classes ------- .. autoapisummary:: schema_salad.fetcher.Fetcher schema_salad.fetcher.MemoryCachingFetcher schema_salad.fetcher.DefaultFetcher Module Contents --------------- .. py:class:: Fetcher Bases: :py:obj:`abc.ABC` .. autoapi-inheritance-diagram:: schema_salad.fetcher.Fetcher :parts: 1 Fetch resources from URIs. .. py:method:: fetch_text(url, content_types = None) :abstractmethod: Retrieve the given resource as a string. .. py:method:: check_exists(url) :abstractmethod: Check if the given resource exists. .. py:method:: urljoin(base_url, url) :abstractmethod: Construct a full (“absolute”) URL by combining a “base URL” with another URL. .. py:attribute:: schemes :value: ['file', 'http', 'https', 'mailto'] .. py:method:: supported_schemes() Return the list of supported URI schemes. .. py:class:: MemoryCachingFetcher(cache) Bases: :py:obj:`Fetcher` .. autoapi-inheritance-diagram:: schema_salad.fetcher.MemoryCachingFetcher :parts: 1 Fetcher that caches resources in memory after retrieval. .. py:attribute:: cache .. py:class:: DefaultFetcher(cache, session) Bases: :py:obj:`MemoryCachingFetcher` .. autoapi-inheritance-diagram:: schema_salad.fetcher.DefaultFetcher :parts: 1 The default Fetcher implementation. .. py:attribute:: session :type: Final .. py:method:: fetch_text(url, content_types = None) Retrieve the given resource as a string. .. py:method:: check_exists(url) Check if the given resource exists. .. py:method:: urljoin(base_url, url) Construct a full (“absolute”) URL by combining a “base URL” with another URL.