betty.extension package¶
Subpackages¶
- betty.extension.cotton_candy package
- Submodules
- Module contents
CottonCandyCottonCandy.assets_directory_path()CottonCandy.comes_after()CottonCandy.default_configuration()CottonCandy.depends_on()CottonCandy.description()CottonCandy.filtersCottonCandy.generate()CottonCandy.globalsCottonCandy.gui_build()CottonCandy.label()CottonCandy.logoCottonCandy.name()CottonCandy.public_css_pathsCottonCandy.webpack_entry_point_cache_keys()CottonCandy.webpack_entry_point_directory_path()
CottonCandyConfigurationCottonCandyConfiguration.DEFAULT_LINK_ACTIVE_COLORCottonCandyConfiguration.DEFAULT_LINK_INACTIVE_COLORCottonCandyConfiguration.DEFAULT_PRIMARY_ACTIVE_COLORCottonCandyConfiguration.DEFAULT_PRIMARY_INACTIVE_COLORCottonCandyConfiguration.__init__()CottonCandyConfiguration.dump()CottonCandyConfiguration.featured_entitiesCottonCandyConfiguration.link_active_colorCottonCandyConfiguration.link_inactive_colorCottonCandyConfiguration.load()CottonCandyConfiguration.logoCottonCandyConfiguration.primary_active_colorCottonCandyConfiguration.primary_inactive_color
person_descendant_families()person_timeline_events()
- betty.extension.demo package
- betty.extension.deriver package
- betty.extension.gramps package
- betty.extension.http_api_doc package
- betty.extension.maps package
- betty.extension.nginx package
- betty.extension.privatizer package
- betty.extension.trees package
- betty.extension.webpack package
- betty.extension.wikipedia package
Module contents¶
Provide the built-in extensions.
- class betty.extension.CottonCandy[source]¶
Bases:
Theme,CssProvider,ConfigurableExtension[CottonCandyConfiguration],Generator,GuiBuilder,Jinja2Provider,WebpackEntryPointProviderProvide Betty’s default front-end theme.
- Parameters:
args (
typing.Any)configuration (
typing.Optional[typing.TypeVar(ConfigurationT, bound=betty.config.Configuration)])kwargs (
typing.Any)
- classmethod assets_directory_path() pathlib._local.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._local.Path
- classmethod comes_after() set[type[betty.app.extension.Extension]][source]¶
The extensions that this one comes after.
The other extensions may or may not be enabled.
- Return type:
- classmethod default_configuration() betty.extension.cotton_candy.CottonCandyConfiguration[source]¶
Get this extension’s default configuration.
- classmethod depends_on() set[type[betty.app.extension.Extension]][source]¶
The extensions this one depends on, and comes after.
- Return type:
- classmethod description() betty.locale.Str[source]¶
Get the human-readable extension description.
- Return type:
- property filters: dict[str, Callable[[...], Any]]¶
Jinja2 filters provided by this extension.
Keys are filter names, and values are the filters themselves.
- async generate(job_context: betty.generate.GenerationContext) None[source]¶
Generate (part of) a project’s site.
- Parameters:
job_context (
betty.generate.GenerationContext)- Return type:
- property globals: dict[str, Any]¶
Jinja2 globals provided by this extension.
Keys are the globals’ names, and values are the globals’ values.
- gui_build() PyQt6.QtWidgets.QWidget[source]¶
Build this extension’s Graphical User Interface component.
- Return type:
PyQt6.QtWidgets.QWidget
- classmethod label() betty.locale.Str[source]¶
Get the human-readable extension label.
- Return type:
- property logo: Path¶
The path to the logo file.
- property public_css_paths: list[str]¶
The public URL paths to the CSS files to include in each HTML page.
- webpack_entry_point_cache_keys() collections.abc.Sequence[str][source]¶
Get the keys that make a Webpack build for this provider unique.
Providers that can be cached regardless may
return ().- Return type:
- class betty.extension.Demo[source]¶
-
Provide demonstration site functionality.
- Parameters:
app (
betty.app.App)args (
typing.Any)kwargs (
typing.Any)
- classmethod depends_on() set[type[betty.app.extension.Extension]][source]¶
The extensions this one depends on, and comes after.
- Return type:
- classmethod project() betty.project.Project[source]¶
Create a new demonstration project.
- Return type:
- class betty.extension.Deriver[source]¶
Bases:
UserFacingExtension,PostLoaderExpand an ancestry by deriving additional data from existing data.
- Parameters:
app (
betty.app.App)args (
typing.Any)kwargs (
typing.Any)
- classmethod comes_before() set[type[betty.app.extension.Extension]][source]¶
The extensions that this one comes before.
The other extensions may or may not be enabled.
- Return type:
- classmethod description() betty.locale.Str[source]¶
Get the human-readable extension description.
- Return type:
- classmethod label() betty.locale.Str[source]¶
Get the human-readable extension label.
- Return type:
- async post_load() None[source]¶
Act on the ancestry having been loaded.
This method is called immediately after
betty.load.Loader.load().- Return type:
- class betty.extension.Gramps[source]¶
Bases:
ConfigurableExtension[GrampsConfiguration],UserFacingExtension,Loader,GuiBuilderIntegrate Betty with Gramps.
- Parameters:
args (
typing.Any)configuration (
typing.Optional[typing.TypeVar(ConfigurationT, bound=betty.config.Configuration)])kwargs (
typing.Any)
- classmethod default_configuration() betty.extension.gramps.config.GrampsConfiguration[source]¶
Get this extension’s default configuration.
- Return type:
- classmethod description() betty.locale.Str[source]¶
Get the human-readable extension description.
- Return type:
- gui_build() betty.extension.gramps.gui._GrampsGuiWidget[source]¶
Build this extension’s Graphical User Interface component.
- Return type:
betty.extension.gramps.gui._GrampsGuiWidget
- classmethod label() betty.locale.Str[source]¶
Get the human-readable extension label.
- Return type:
- class betty.extension.HttpApiDoc[source]¶
Bases:
UserFacingExtension,WebpackEntryPointProviderProvide user-friendly HTTP API documentation.
- Parameters:
app (
betty.app.App)args (
typing.Any)kwargs (
typing.Any)
- classmethod assets_directory_path() pathlib._local.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._local.Path
- classmethod depends_on() set[type[betty.app.extension.Extension]][source]¶
The extensions this one depends on, and comes after.
- Return type:
- classmethod description() betty.locale.Str[source]¶
Get the human-readable extension description.
- Return type:
- classmethod label() betty.locale.Str[source]¶
Get the human-readable extension label.
- Return type:
- webpack_entry_point_cache_keys() collections.abc.Sequence[str][source]¶
Get the keys that make a Webpack build for this provider unique.
Providers that can be cached regardless may
return ().- Return type:
- class betty.extension.Maps[source]¶
Bases:
UserFacingExtension,WebpackEntryPointProviderProvide interactive maps for use on web pages.
- Parameters:
app (
betty.app.App)args (
typing.Any)kwargs (
typing.Any)
- classmethod assets_directory_path() pathlib._local.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._local.Path
- classmethod depends_on() set[type[betty.app.extension.Extension]][source]¶
The extensions this one depends on, and comes after.
- Return type:
- classmethod description() betty.locale.Str[source]¶
Get the human-readable extension description.
- Return type:
- classmethod label() betty.locale.Str[source]¶
Get the human-readable extension label.
- Return type:
- webpack_entry_point_cache_keys() collections.abc.Sequence[str][source]¶
Get the keys that make a Webpack build for this provider unique.
Providers that can be cached regardless may
return ().- Return type:
- class betty.extension.Nginx[source]¶
Bases:
ConfigurableExtension[NginxConfiguration],UserFacingExtension,Generator,ServerProvider,GuiBuilder,CommandProviderIntegrate Betty with nginx (and Docker).
- Parameters:
args (
typing.Any)configuration (
typing.Optional[typing.TypeVar(ConfigurationT, bound=betty.config.Configuration)])kwargs (
typing.Any)
- classmethod assets_directory_path() pathlib._local.Path | None[source]¶
Return the path on disk where the extension’s assets are located.
This may be anywhere in your Python package.
- Return type:
pathlib._local.Path|None
- classmethod default_configuration() betty.extension.nginx.config.NginxConfiguration[source]¶
Get this extension’s default configuration.
- Return type:
- classmethod description() betty.locale.Str[source]¶
Get the human-readable extension description.
- Return type:
- async generate(job_context: betty.generate.GenerationContext) None[source]¶
Generate (part of) a project’s site.
- Parameters:
job_context (
betty.generate.GenerationContext)- Return type:
- gui_build() betty.extension.nginx.gui._NginxGuiWidget[source]¶
Build this extension’s Graphical User Interface component.
- Return type:
betty.extension.nginx.gui._NginxGuiWidget
- classmethod label() betty.locale.Str[source]¶
Get the human-readable extension label.
- Return type:
- class betty.extension.Privatizer[source]¶
Bases:
UserFacingExtension,PostLoaderExtend the Betty Application with privatization features.
- Parameters:
app (
betty.app.App)args (
typing.Any)kwargs (
typing.Any)
- classmethod description() betty.locale.Str[source]¶
Get the human-readable extension description.
- Return type:
- classmethod label() betty.locale.Str[source]¶
Get the human-readable extension label.
- Return type:
- async post_load() None[source]¶
Act on the ancestry having been loaded.
This method is called immediately after
betty.load.Loader.load().- Return type:
- class betty.extension.Trees[source]¶
Bases:
UserFacingExtension,WebpackEntryPointProviderProvide interactive family trees for use in web pages.
- Parameters:
app (
betty.app.App)args (
typing.Any)kwargs (
typing.Any)
- classmethod assets_directory_path() pathlib._local.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._local.Path
- classmethod depends_on() set[type[betty.app.extension.Extension]][source]¶
The extensions this one depends on, and comes after.
- Return type:
- classmethod description() betty.locale.Str[source]¶
Get the human-readable extension description.
- Return type:
- classmethod label() betty.locale.Str[source]¶
Get the human-readable extension label.
- Return type:
- webpack_entry_point_cache_keys() collections.abc.Sequence[str][source]¶
Get the keys that make a Webpack build for this provider unique.
Providers that can be cached regardless may
return ().- Return type:
- class betty.extension.Webpack[source]¶
Bases:
Extension,CssProvider,Jinja2Provider,GeneratorIntegrate Betty with Webpack.
- Parameters:
app (
betty.app.App)args (
typing.Any)kwargs (
typing.Any)
- classmethod assets_directory_path() pathlib._local.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._local.Path
- build_requirement() betty.requirement.Requirement[source]¶
Get the requirement that must be satisfied for Webpack builds to be available.
- Return type:
- classmethod enable_requirement() betty.requirement.Requirement[source]¶
Define the requirement for this extension to be enabled.
This defaults to the extension’s dependencies.
- Return type:
- property filters: dict[str, Callable[[...], Any]]¶
Jinja2 filters provided by this extension.
Keys are filter names, and values are the filters themselves.
- async generate(job_context: betty.generate.GenerationContext) None[source]¶
Generate (part of) a project’s site.
- Parameters:
job_context (
betty.generate.GenerationContext)- Return type:
- new_context_vars() dict[str, Any][source]¶
Create new variables for a new
jinja2.runtime.Context.Keys are the variable names, and values are variable values.
- Return type:
- async prebuild(job_context: betty.job.Context) None[source]¶
Prebuild the Webpack assets.
- Parameters:
job_context (
betty.job.Context)- Return type:
- class betty.extension.Wikipedia[source]¶
Bases:
ConfigurableExtension[WikipediaConfiguration],UserFacingExtension,Jinja2Provider,PostLoader,GuiBuilderIntegrates Betty with Wikipedia.
- Parameters:
args (
typing.Any)kwargs (
typing.Any)
- __init__(*args: Any, **kwargs: Any)[source]¶
- Parameters:
args (
typing.Any)kwargs (
typing.Any)
- classmethod assets_directory_path() pathlib._local.Path | None[source]¶
Return the path on disk where the extension’s assets are located.
This may be anywhere in your Python package.
- Return type:
pathlib._local.Path|None
- classmethod default_configuration() betty.extension.wikipedia.config.WikipediaConfiguration[source]¶
Get this extension’s default configuration.
- classmethod description() betty.locale.Str[source]¶
Get the human-readable extension description.
- Return type:
- property filters: dict[str, Callable[[...], Any]]¶
Jinja2 filters provided by this extension.
Keys are filter names, and values are the filters themselves.
- gui_build() betty.extension.wikipedia.gui._WikipediaGuiWidget[source]¶
Build this extension’s Graphical User Interface component.
- Return type:
betty.extension.wikipedia.gui._WikipediaGuiWidget
- classmethod label() betty.locale.Str[source]¶
Get the human-readable extension label.
- Return type:
- async post_load() None[source]¶
Act on the ancestry having been loaded.
This method is called immediately after
betty.load.Loader.load().- Return type: