SatisfactoryPlusCalculator/factorygame/data/provider.py

17 lines
443 B
Python

import abc
from typing import Callable
from sqlalchemy.orm import Session as AlchemySession
from .models import Resource
class RecipeProvider(abc.ABC):
@abc.abstractmethod
def search_for_resource(self, session: AlchemySession, search: str, prompt: Callable) -> tuple[Resource, bool]:
pass
@abc.abstractmethod
def update_resource_recipes(self, session: AlchemySession, resource: Resource) -> Resource:
pass