SatisfactoryPlusCalculator/factorygame/data/provider.py

17 lines
359 B
Python
Raw Normal View History

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