In web applications it is common practice to use repository pattern for data access. Usually this is the way to extract data from a database. For example:
from sqlalchemy.orm import declarative_base
Base = declarative_base(...)
class User(Base):
id: ...
first_name: ...
last_name: ...
class UserRepository(BaseRepository):
def get_by_id(self, ...): pass
def get_all(self, ...): pass
# etc
But what if the source of data are external API or excel file? When working with API they usually call a repository as a “client”. But it gets data and the meaning is the same. Should I name the class SomeExternalAPIRepository
? What about extracting data from Excel file? SomeExcelRepository
?
What is naming convention for listed cases?