betty.project package¶
Subpackages¶
- betty.project.extension package
- Subpackages
- betty.project.extension.cotton_candy package
- Submodules
- betty.project.extension.cotton_candy.config module
CottonCandyConfigurationCottonCandyConfiguration.DEFAULT_LINK_ACTIVE_COLORCottonCandyConfiguration.DEFAULT_LINK_INACTIVE_COLORCottonCandyConfiguration.DEFAULT_PRIMARY_ACTIVE_COLORCottonCandyConfiguration.DEFAULT_PRIMARY_INACTIVE_COLORCottonCandyConfiguration.__init__()CottonCandyConfiguration.dump()CottonCandyConfiguration.featured_entitiesCottonCandyConfiguration.get_mutable_instances()CottonCandyConfiguration.link_active_colorCottonCandyConfiguration.link_inactive_colorCottonCandyConfiguration.load()CottonCandyConfiguration.primary_active_colorCottonCandyConfiguration.primary_inactive_color
- betty.project.extension.cotton_candy.config module
- Module contents
CottonCandyCottonCandy.__init__()CottonCandy.__new__()CottonCandy.assets_directory_path()CottonCandy.bootstrap()CottonCandy.comes_after()CottonCandy.depends_on()CottonCandy.filtersCottonCandy.new_default_configuration()CottonCandy.new_for_project()CottonCandy.public_css_pathsCottonCandy.register_event_handlers()CottonCandy.webpack_entry_point_cache_keys()CottonCandy.webpack_entry_point_directory_path()
- 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.get_mutable_instances()FamilyTreeConfiguration.load()FamilyTreeConfiguration.place_typesFamilyTreeConfiguration.presence_roles
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.raspberry_mint package
- Submodules
- betty.project.extension.raspberry_mint.config module
RaspberryMintConfigurationRaspberryMintConfiguration.DEFAULT_PRIMARY_COLORRaspberryMintConfiguration.DEFAULT_SECONDARY_COLORRaspberryMintConfiguration.DEFAULT_TERTIARY_COLORRaspberryMintConfiguration.__init__()RaspberryMintConfiguration.dump()RaspberryMintConfiguration.featured_entitiesRaspberryMintConfiguration.get_mutable_instances()RaspberryMintConfiguration.load()RaspberryMintConfiguration.primary_colorRaspberryMintConfiguration.secondary_colorRaspberryMintConfiguration.tertiary_color
- betty.project.extension.raspberry_mint.config module
- Module contents
RaspberryMintRaspberryMint.__init__()RaspberryMint.assets_directory_path()RaspberryMint.bootstrap()RaspberryMint.comes_after()RaspberryMint.depends_on()RaspberryMint.filtersRaspberryMint.new_default_configuration()RaspberryMint.new_for_project()RaspberryMint.public_css_pathsRaspberryMint.register_event_handlers()RaspberryMint.webpack_entry_point_cache_keys()RaspberryMint.webpack_entry_point_directory_path()
- Submodules
- betty.project.extension.trees package
- betty.project.extension.webpack package
- betty.project.extension.wikipedia package
- betty.project.extension.cotton_candy package
- Module contents
- Subpackages
- betty.project.generate package
Submodules¶
- betty.project.config module
CopyrightNoticeConfigurationCopyrightNoticeConfigurationMappingDEFAULT_LIFETIME_THRESHOLDEntityTypeConfigurationEntityTypeConfigurationMappingEventTypeConfigurationMappingExtensionInstanceConfigurationMappingGenderConfigurationMappingLicenseConfigurationLicenseConfigurationMappingLocaleConfigurationLocaleConfigurationMappingPlaceTypeConfigurationMappingPresenceRoleConfigurationMappingProjectConfigurationProjectConfiguration.__init__()ProjectConfiguration.assets_directory_pathProjectConfiguration.authorProjectConfiguration.base_urlProjectConfiguration.clean_urlsProjectConfiguration.configuration_file_pathProjectConfiguration.copyright_noticeProjectConfiguration.copyright_noticesProjectConfiguration.debugProjectConfiguration.dump()ProjectConfiguration.entity_typesProjectConfiguration.event_typesProjectConfiguration.extensionsProjectConfiguration.gendersProjectConfiguration.licenseProjectConfiguration.licensesProjectConfiguration.lifetime_thresholdProjectConfiguration.load()ProjectConfiguration.localesProjectConfiguration.localize_www_directory_path()ProjectConfiguration.logoProjectConfiguration.nameProjectConfiguration.new()ProjectConfiguration.output_directory_pathProjectConfiguration.place_typesProjectConfiguration.presence_rolesProjectConfiguration.project_directory_pathProjectConfiguration.root_pathProjectConfiguration.titleProjectConfiguration.urlProjectConfiguration.www_directory_path
- betty.project.factory module
- betty.project.load module
- betty.project.url module
Module contents¶
Provide the project API.
Projects are how people use Betty. A project is a workspace, starting out with the user’s configuration, and combining it with the resulting ancestry, allowing the user to perform tasks, such as generating a site from the entire project.
- final class betty.project.Project[source]¶
Bases:
Configurable[ProjectConfiguration],TargetFactory,ServiceProviderDefine a Betty project.
A project combines project configuration and the resulting ancestry.
- __init__(app: App, configuration: ProjectConfiguration, *, ancestry: Ancestry)[source]¶
- assets¶
- copyright_notice¶
- copyright_notice_repository¶
- entity_type_repository¶
- event_dispatcher¶
- event_type_repository¶
- extension_repository¶
- extensions¶
- gender_repository¶
- jinja2_environment¶
- license¶
- license_repository¶
- localized_url_generator¶
- localizers¶
- property name: MachineName¶
The project name.
If no project name was configured, this defaults to the hash of the configuration file path.
- async classmethod new(app: App, *, configuration: ProjectConfiguration, ancestry: Ancestry | None = None) Self[source]¶
Create a new instance.
- async new_target(cls: type[_T]) _T[source]¶
Create a new instance.
- Returns:
- If
clsextendsbetty.project.factory.ProjectDependentFactory, this will call return cls’snew()’s return value.
- If
- If
clsextendsbetty.app.factory.AppDependentFactory, this will call returncls’s new()’s return value.
- If
- If
clsextendsbetty.factory.IndependentFactory, this will call returncls’s new()’s return value.
- If
Otherwise
cls()will be called without arguments, and the resulting instance will be returned.
- Raises:
FactoryError – raised when
clscould not be instantiated.
- classmethod new_temporary(app: App, *, configuration: ProjectConfiguration | None = None, ancestry: Ancestry | None = None) AsyncIterator[Self][source]¶
Creat a new, temporary, isolated project.
The project will not leave any traces on the system, except when it uses global Betty functionality such as caches.
- place_type_repository¶
- presence_role_repository¶
- renderer¶
- static_url_generator¶
- url_generator¶
- class betty.project.ProjectEvent[source]¶
Bases:
EventAn event that is dispatched within the context of a
betty.project.Project.- __init__(job_context: ProjectContext)[source]¶
- property job_context: ProjectContext¶
The site generation job context.
- property project: Project¶
The
betty.project.Projectthis event is dispatched within.
- final class betty.project.ProjectExtensions[source]¶
Bases:
objectManage the extensions running within the
betty.project.Project.This is internal. It MAY be used anywhere in Betty’s source code, but MUST NOT be used by third-party code.
- final class betty.project.ProjectSchema[source]¶
Bases:
ProjectDependentFactory,SchemaA JSON Schema for a project.
- async classmethod def_url(project: Project, def_name: str) str[source]¶
Get the URL to a project’s JSON Schema definition.