2024-01-29 17:37:30 +00:00
|
|
|
import abc
|
|
|
|
|
2024-01-30 17:28:35 +00:00
|
|
|
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
|
2024-01-30 17:28:35 +00:00
|
|
|
def search_for_resource(self, session: AlchemySession, search: str) -> tuple[Resource, bool]:
|
2024-01-29 17:37:30 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
@abc.abstractmethod
|
2024-02-02 16:44:14 +00:00
|
|
|
def update_resource_recipes(self, session: AlchemySession, resource: Resource) -> Resource:
|
2024-01-29 17:37:30 +00:00
|
|
|
pass
|