create_app

gafaelfawr.app.create_app(settings_path: str, redis_pool: Optional[Redis] = None, http_session: Optional[ClientSession] = None, **settings) → Application

Create and configure the Gafaelfawr application.

Parameters:
  • settings_path (str) – Settings file to load.
  • redis_pool (aioredis.Redis, optional) – Redis connection pool. One will be constructed from the URL in the application settings if this is not provided.
  • http_session (aiohttp.ClientSession, optional) – Client session to use if provided. If one is not provided, it will be created dynamically by safir. The provided session is not closed on app shutdown.
  • **settings (typing.Any) – Settings that override settings read from the configuration file.
Returns:

application – The constructed application.

Return type:

aiohttp.web.Application