SatisfactoryPlusCalculator/factorygame/data/provider.py

17 lines
386 B
Python
Raw Normal View History

2024-01-29 17:37:30 +00:00
import abc
from sqlalchemy.orm import Session as AlchemySession
2024-01-29 17:37:30 +00:00
from .models import Resource
class RecipeProvider(abc.ABC):
@abc.abstractmethod
def search_for_resource(self, session: AlchemySession, search: str) -> tuple[Resource, bool]:
2024-01-29 17:37:30 +00:00
pass
@abc.abstractmethod
def update_resource_recipes(self, session: AlchemySession, resource: Resource):
2024-01-29 17:37:30 +00:00
pass