Source code for betty.load
"""
Provide the Ancestry loading API.
"""
import logging
from betty.app import App
[docs]
def getLogger() -> logging.Logger:
"""
Get the ancestry loading logger.
"""
return logging.getLogger(__name__)
[docs]
class Loader:
[docs]
async def load(self) -> None:
raise NotImplementedError(repr(self))
[docs]
class PostLoader:
[docs]
async def post_load(self) -> None:
raise NotImplementedError(repr(self))
[docs]
async def load(app: App) -> None:
"""
Load an ancestry.
"""
await app.dispatcher.dispatch(Loader)()
await app.dispatcher.dispatch(PostLoader)()