generated from nathanwoodburn/python-webserver-template
feat: Initial code
This commit is contained in:
17
collectors/base.py
Normal file
17
collectors/base.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Dict, List
|
||||
|
||||
|
||||
@dataclass
|
||||
class CollectionResult:
|
||||
source: str
|
||||
assets: List[Dict]
|
||||
status: str
|
||||
error: str = ""
|
||||
|
||||
|
||||
class BaseCollector:
|
||||
source_name = "unknown"
|
||||
|
||||
def collect(self) -> CollectionResult:
|
||||
raise NotImplementedError
|
||||
Reference in New Issue
Block a user