betty.project.extension package¶
Subpackages¶
- betty.project.extension.cotton_candy package
- Submodules
- betty.project.extension.cotton_candy.config module
ColorConfigurationCottonCandyConfigurationCottonCandyConfiguration.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.primary_active_colorCottonCandyConfiguration.primary_inactive_colorCottonCandyConfiguration.update()
- betty.project.extension.cotton_candy.search module
- betty.project.extension.cotton_candy.config module
- Module contents
CottonCandyCottonCandy.__init__()CottonCandy.assets_directory_path()CottonCandy.comes_after()CottonCandy.default_configuration()CottonCandy.depends_on()CottonCandy.filtersCottonCandy.new_for_project()CottonCandy.public_css_pathsCottonCandy.register_event_handlers()CottonCandy.webpack_entry_point_cache_keys()CottonCandy.webpack_entry_point_directory_path()
associated_file_references()person_descendant_families()person_timeline_events()
- Submodules
- betty.project.extension.demo package
- betty.project.extension.deriver package
- betty.project.extension.gramps package
- Submodules
- betty.project.extension.gramps.config module
FamilyTreeConfigurationFamilyTreeConfiguration.__init__()FamilyTreeConfiguration.dump()FamilyTreeConfiguration.event_typesFamilyTreeConfiguration.file_pathFamilyTreeConfiguration.gendersFamilyTreeConfiguration.load()FamilyTreeConfiguration.place_typesFamilyTreeConfiguration.presence_rolesFamilyTreeConfiguration.update()
FamilyTreeConfigurationSequenceGrampsConfigurationPluginMapping
- betty.project.extension.gramps.config module
- Module contents
- Submodules
- betty.project.extension.http_api_doc package
- betty.project.extension.maps package
- betty.project.extension.privatizer package
- betty.project.extension.trees package
- betty.project.extension.webpack package
- betty.project.extension.wikipedia package
Module contents¶
Provide Betty’s extension API.
- class betty.project.extension.ConfigurableExtension[source]¶
Bases:
Extension,Generic[_ConfigurationT],Configurable[_ConfigurationT]A configurable extension.
- exception betty.project.extension.CyclicDependencyError[source]¶
Bases:
ExtensionError,RuntimeErrorRaised when extensions define a cyclic dependency, e.g. two extensions depend on each other.
- class betty.project.extension.Dependencies[source]¶
Bases:
AllRequirementsCheck a dependent’s dependency requirements.
- __init__(dependent: type[Extension], extension_id_to_type_map: PluginIdToTypeMap[Extension], dependency_requirements: Sequence[Requirement])[source]¶
This is internal. It MAY be used anywhere in Betty’s source code, but MUST NOT be used by third-party code.
- summary() Localizable[source]¶
Get the requirement’s human-readable summary.
- betty.project.extension.EXTENSION_REPOSITORY: PluginRepository[Extension] = <betty.plugin.entry_point.EntryPointPluginRepository object>¶
The project extension plugin repository.
Read more about Extension plugins.
- class betty.project.extension.Extension[source]¶
Bases:
Plugin,CoreComponent,ProjectDependentFactoryIntegrate optional functionality with Betty :py:class:`betty.project.Project`s.
Read more about Extension plugins.
To test your own subclasses, use
betty.test_utils.project.extension.ExtensionTestBase.- classmethod assets_directory_path() Path | None[source]¶
Return the path on disk where the extension’s assets are located.
This may be anywhere in your Python package.
- classmethod comes_after() set[type[Extension] | str][source]¶
The extensions that this one comes after.
The other extensions may or may not be enabled.
- classmethod comes_before() set[type[Extension] | str][source]¶
The extensions that this one comes before.
The other extensions may or may not be enabled.
- classmethod depends_on() set[type[Extension] | str][source]¶
The extensions this one depends on, and comes after.
- async classmethod new_for_project(project: Project) Self[source]¶
Create a new instance using the given project.
- register_event_handlers(registry: EventHandlerRegistry) None[source]¶
Register event handlers with the project.
- async classmethod requirement() Requirement[source]¶
Define the requirement for this extension to be enabled.
This defaults to the extension’s dependencies.
- exception betty.project.extension.ExtensionError[source]¶
Bases:
ExceptionA generic extension API error.