betty.extension.cotton_candy.search module - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.extension.cotton_candy.search module

Provide Cotton Candy’s search functionality.

class betty.extension.cotton_candy.search.Index

  Bases: `object`

  Build search indexes.

  Parameters:

    - app (`betty.app.App`)

    - job_context (`betty.job.Context` | `None`)

    - localizer (`betty.locale.Localizer`)

  __init__(app: betty.app.App, job_context: betty.job.Context | None, localizer: betty.locale.Localizer)
    Parameters:

      - app (`betty.app.App`)

      - job_context (`betty.job.Context` | `None`)

      - localizer (`betty.locale.Localizer`)

  async build() → collections.abc.AsyncIterable[dict[str, str]]

    Build the search index.

    Return type:

      `collections.abc.AsyncIterable`[`dict`[`str`, `str`]]