betty.extension.wikipedia package - 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.wikipedia package

## Submodules

- betty.extension.wikipedia.config module
  - `WikipediaConfiguration`
    - `WikipediaConfiguration.__init__()`
    - `WikipediaConfiguration.dump()`
    - `WikipediaConfiguration.load()`
    - `WikipediaConfiguration.populate_images`
    - `WikipediaConfiguration.update()`

## Module contents

Integrate Betty with Wikipedia.

final class betty.extension.wikipedia.Wikipedia

  Bases: `ConfigurableExtension`[`WikipediaConfiguration`], `Jinja2Provider`

  Integrates Betty with Wikipedia.

  __init__(project: Project)
  classmethod assets_directory_path() → Path | None

    Return the path on disk where the extension’s assets are located.

    This may be anywhere in your Python package.

  classmethod default_configuration() → WikipediaConfiguration

    Get this extension’s default configuration.

  property filters: dict[str, Callable[[...], Any]]

    Jinja2 filters provided by this extension.

    Keys are filter names, and values are the filters themselves.

  classmethod plugin_description() → Localizable

    Get the human-readable long plugin description.

  classmethod plugin_id() → MachineName

    Get the plugin ID.

    IDs are unique per plugin type:

    - A plugin repository MUST at most have a single plugin for any ID.

    - Different plugin repositories MAY each have a plugin with the same ID.

  classmethod plugin_label() → Localizable

    Get the human-readable short plugin label.

  register_event_handlers(registry: EventHandlerRegistry) → None

    Register event handlers with the project.

  property retriever: _Retriever

    The Wikipedia content retriever.