granicus_archiver.web.app

class granicus_archiver.web.app.AccessLogger(logger: Logger, log_format: str = '%a "%r" %s %b "%{Referer}i" "%{User-Agent}i"')[source]

Bases: AccessLogger

Parameters:
  • logger (Logger)

  • log_format (str)

property enabled: bool

Check if logger is enabled.

log(request: Request, response: StreamResponse, time: float) None[source]

Emit log to logger.

Parameters:
  • request (Request)

  • response (StreamResponse)

  • time (float)

Return type:

None

class granicus_archiver.web.app.WebCliContext(parent: 'BaseContext', app_conf: 'AppConfig')[source]

Bases: object

Parameters:
class granicus_archiver.web.app.AppDataContext(app: Application)[source]

Bases: object

Context manager for setting up the application data

Parameters:

app (web.Application)

update_timeout = 300

Update interval to check for updated data files

update_task: Task | None

Task to check for updated data files

This task is created in when the context is entered and cancelled closed.

async load_app_models() None[source]

Load the model data

If config.AppConfig.use_s3 is True, the data files are downloaded from S3 using s3client.S3Client.

Return type:

None