1# Copyright (c) 2022 Nordic Semiconductor ASA 2# 3# SPDX-License-Identifier: Apache-2.0 4 5from abc import ABC, abstractmethod 6from pathlib import Path 7from typing import List, Type 8 9class ZephyrBlobFetcher(ABC): 10 11 @staticmethod 12 def get_fetchers() -> List[Type['ZephyrBlobFetcher']]: 13 '''Get a list of all currently defined fetcher classes.''' 14 return ZephyrBlobFetcher.__subclasses__() 15 16 @classmethod 17 @abstractmethod 18 def schemes(cls) -> List[str]: 19 '''Return this fetcher's schemes.''' 20 21 @abstractmethod 22 def fetch(self, url: str, path: Path): 23 ''' Fetch a blob and store it ''' 24