betty.extension.cotton_candy package

Submodules

Module contents

Provide Betty’s default theme.

class betty.extension.cotton_candy.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.cotton_candy.CottonCandyConfiguration(*, featured_entities=None, primary_inactive_color='#ffc0cb', primary_active_color='#ff69b4', link_inactive_color='#149988', link_active_color='#2a615a')[source]

Bases: Configuration

Parameters:
featured_entities=None

primary_inactive_color='#ffc0cb'

primary_active_color='#ff69b4'

DEFAULT_PRIMARY_ACTIVE_COLOR = '#ff69b4'
DEFAULT_PRIMARY_INACTIVE_COLOR = '#ffc0cb'
dump()[source]

Dump this instance to a portable format.

Return type:

typing.Union[bool, int, float, str, None, typing.Sequence[typing.Union[bool, int, float, str, None, typing.Sequence[Dump], typing.Mapping[str, Dump]]], typing.Mapping[str, typing.Union[bool, int, float, str, None, typing.Sequence[Dump], typing.Mapping[str, Dump]]], type[betty.serde.dump.Void]]

property featured_entities : EntityReferenceSequence[UserFacingEntity & Entity]
classmethod load(dump, configuration=None)[source]

Load dumped configuration into a new configuration instance.

Parameters:
dump

configuration=None

Return type:

typing.Self

property primary_active_color : _ColorConfiguration
property primary_inactive_color : _ColorConfiguration
betty.extension.cotton_candy.person_descendant_families(person)[source]

Gather a person’s families they are a parent in.

Parameters:
person

Return type:

typing.Iterable[tuple[collections.abc.Sequence[betty.model.ancestry.Person], collections.abc.Sequence[betty.model.ancestry.Person]]]

betty.extension.cotton_candy.person_timeline_events(person, lifetime_threshold)[source]

Gather all events for a person’s timeline.

Parameters:
person

lifetime_threshold

Return type:

typing.Iterable[betty.model.ancestry.Event]