AnP/Python/AnP/Interfaces/Managers/BrowsersManagerInterface.py

27 lines
795 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from typing import Self, Any, Sequence
from abc import ABC, abstractmethod
from AnP.Interfaces.Abstracts.BrowserAbstractInterface import BrowserAbstractInterface
from AnP.DSLs.ScrapDSL import Action
class BrowsersManagerInterface(ABC):
@abstractmethod
def update(self:Self) -> None:pass
@abstractmethod
def reset(self:Self) -> None:pass
@abstractmethod
def close(self:Self) -> None:pass
@abstractmethod
def add(self:Self, inputs:Any|None, overwrite:bool = False) -> None:pass
@abstractmethod
def get(self:Self, key:str) -> BrowserAbstractInterface|None:pass
@abstractmethod
def run(self:Self, key:str, actions:Sequence[Action], shared:dict[str, Any|None] = {}) -> dict[str, Any|None]:pass