mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
16 lines
336 B
Python
16 lines
336 B
Python
"""Base service class."""
|
|
|
|
from typing import TypeVar, Generic
|
|
|
|
from basic_memory.models import Base
|
|
|
|
T = TypeVar("T", bound=Base)
|
|
|
|
|
|
class BaseService(Generic[T]):
|
|
"""Base service that takes a repository."""
|
|
|
|
def __init__(self, repository):
|
|
"""Initialize service with repository."""
|
|
self.repository = repository
|