betty.extension package

Subpackages

Module contents

Provide the built-in extensions.

class betty.extension.CottonCandy(*args, configuration=None, **kwargs)[source]

Bases: Theme, CssProvider, ConfigurableExtension[CottonCandyConfiguration], GuiBuilder, Jinja2Provider, WebpackEntrypointProvider

Parameters:
*args

configuration=None

**kwargs

classmethod assets_directory_path()[source]

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

This may be anywhere in your Python package.

Return type:

pathlib.Path

classmethod comes_after()[source]
Return type:

set[type[betty.app.extension.Extension]]

classmethod default_configuration()[source]
Return type:

betty.extension.cotton_candy.CottonCandyConfiguration

classmethod depends_on()[source]
Return type:

set[type[betty.app.extension.Extension]]

classmethod description()[source]
Return type:

betty.locale.Str

property filters : dict[str, Callable[[...], Any]]
property globals : dict[str, Any]
gui_build()[source]
Return type:

PyQt6.QtWidgets.QWidget

classmethod label()[source]
Return type:

betty.locale.Str

classmethod name()[source]
Return type:

str

property public_css_paths : list[str]
webpack_entrypoint_cache_keys()[source]

Get the keys that make a Webpack build for this provider unique.

Providers that can be cached regardless may return ().

Return type:

collections.abc.Sequence[str]

classmethod webpack_entrypoint_directory_path()[source]

Get the path to the directory with the entrypoint assets.

The directory must include at least a package.json and main.ts.

Return type:

pathlib.Path

class betty.extension.Demo(app, *args, **kwargs)[source]

Bases: Extension, Loader

Parameters:
app

*args

**kwargs

classmethod depends_on()[source]
Return type:

set[type[betty.app.extension.Extension]]

async load()[source]
Return type:

None

classmethod name()[source]
Return type:

str

classmethod project()[source]
Return type:

betty.project.Project

class betty.extension.Deriver(app, *args, **kwargs)[source]

Bases: UserFacingExtension, PostLoader

Parameters:
app

*args

**kwargs

classmethod comes_before()[source]
Return type:

set[type[betty.app.extension.Extension]]

classmethod description()[source]
Return type:

betty.locale.Str

classmethod label()[source]
Return type:

betty.locale.Str

classmethod name()[source]
Return type:

str

async post_load()[source]
Return type:

None

class betty.extension.Gramps(*args, configuration=None, **kwargs)[source]

Bases: ConfigurableExtension[GrampsConfiguration], UserFacingExtension, Loader, GuiBuilder

Parameters:
*args

configuration=None

**kwargs

classmethod default_configuration()[source]
Return type:

betty.extension.gramps.config.GrampsConfiguration

classmethod description()[source]
Return type:

betty.locale.Str

gui_build()[source]
Return type:

betty.extension.gramps.gui._GrampsGuiWidget

classmethod label()[source]
Return type:

betty.locale.Str

async load()[source]
Return type:

None

classmethod name()[source]
Return type:

str

class betty.extension.HttpApiDoc(app, *args, **kwargs)[source]

Bases: UserFacingExtension, WebpackEntrypointProvider

Parameters:
app

*args

**kwargs

classmethod assets_directory_path()[source]

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

This may be anywhere in your Python package.

Return type:

pathlib.Path

classmethod depends_on()[source]
Return type:

set[type[betty.app.extension.Extension]]

classmethod description()[source]
Return type:

betty.locale.Str

classmethod label()[source]
Return type:

betty.locale.Str

classmethod name()[source]
Return type:

str

webpack_entrypoint_cache_keys()[source]

Get the keys that make a Webpack build for this provider unique.

Providers that can be cached regardless may return ().

Return type:

collections.abc.Sequence[str]

classmethod webpack_entrypoint_directory_path()[source]

Get the path to the directory with the entrypoint assets.

The directory must include at least a package.json and main.ts.

Return type:

pathlib.Path

class betty.extension.Maps(app, *args, **kwargs)[source]

Bases: UserFacingExtension, WebpackEntrypointProvider

Parameters:
app

*args

**kwargs

classmethod assets_directory_path()[source]

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

This may be anywhere in your Python package.

Return type:

pathlib.Path

classmethod depends_on()[source]
Return type:

set[type[betty.app.extension.Extension]]

classmethod description()[source]
Return type:

betty.locale.Str

classmethod label()[source]
Return type:

betty.locale.Str

classmethod name()[source]
Return type:

str

webpack_entrypoint_cache_keys()[source]

Get the keys that make a Webpack build for this provider unique.

Providers that can be cached regardless may return ().

Return type:

collections.abc.Sequence[str]

classmethod webpack_entrypoint_directory_path()[source]

Get the path to the directory with the entrypoint assets.

The directory must include at least a package.json and main.ts.

Return type:

pathlib.Path

class betty.extension.Nginx(*args, configuration=None, **kwargs)[source]

Bases: ConfigurableExtension[NginxConfiguration], Generator, ServerProvider, GuiBuilder

Parameters:
*args

configuration=None

**kwargs

classmethod assets_directory_path()[source]

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

This may be anywhere in your Python package.

Return type:

pathlib.Path | None

classmethod default_configuration()[source]
Return type:

betty.extension.nginx.NginxConfiguration

classmethod description()[source]
Return type:

betty.locale.Str

async generate(job_context)[source]
Parameters:
job_context

Return type:

None

gui_build()[source]
Return type:

PyQt6.QtWidgets.QWidget

property https : bool
classmethod label()[source]
Return type:

betty.locale.Str

property servers : Sequence[Server]
property www_directory_path : str
class betty.extension.Privatizer(app, *args, **kwargs)[source]

Bases: UserFacingExtension, PostLoader

Parameters:
app

*args

**kwargs

classmethod description()[source]
Return type:

betty.locale.Str

classmethod label()[source]
Return type:

betty.locale.Str

classmethod name()[source]
Return type:

str

async post_load()[source]
Return type:

None

privatize()[source]
Return type:

None

class betty.extension.Trees(app, *args, **kwargs)[source]

Bases: UserFacingExtension, WebpackEntrypointProvider

Parameters:
app

*args

**kwargs

classmethod assets_directory_path()[source]

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

This may be anywhere in your Python package.

Return type:

pathlib.Path

classmethod depends_on()[source]
Return type:

set[type[betty.app.extension.Extension]]

classmethod description()[source]
Return type:

betty.locale.Str

classmethod label()[source]
Return type:

betty.locale.Str

classmethod name()[source]
Return type:

str

webpack_entrypoint_cache_keys()[source]

Get the keys that make a Webpack build for this provider unique.

Providers that can be cached regardless may return ().

Return type:

collections.abc.Sequence[str]

classmethod webpack_entrypoint_directory_path()[source]

Get the path to the directory with the entrypoint assets.

The directory must include at least a package.json and main.ts.

Return type:

pathlib.Path

class betty.extension.Webpack(app, *args, **kwargs)[source]

Bases: Extension, CssProvider, Jinja2Provider, Generator

Parameters:
app

*args

**kwargs

classmethod assets_directory_path()[source]

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

This may be anywhere in your Python package.

Return type:

pathlib.Path

build_requirement()[source]
Return type:

betty.requirement.Requirement

classmethod enable_requirement()[source]

Define the requirement for this extension to be enabled.

This defaults to the extension’s dependencies.

Return type:

betty.requirement.Requirement

property filters : dict[str, Callable[[...], Any]]
async generate(job_context)[source]
Parameters:
job_context

Return type:

None

classmethod name()[source]
Return type:

str

new_context_vars()[source]
Return type:

dict[str, typing.Any]

async prebuild(job_context)[source]
Parameters:
job_context

Return type:

None

property public_css_paths : list[str]
class betty.extension.Wikipedia(*args, **kwargs)[source]

Bases: UserFacingExtension, Jinja2Provider, PostLoader

Parameters:
*args

**kwargs

classmethod assets_directory_path()[source]

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

This may be anywhere in your Python package.

Return type:

pathlib.Path | None

classmethod description()[source]
Return type:

betty.locale.Str

property filters : dict[str, Callable[[...], Any]]
classmethod label()[source]
Return type:

betty.locale.Str

classmethod name()[source]
Return type:

str

async post_load()[source]
Return type:

None