config_wrangler.config_templates.keepass_config module

pydantic model config_wrangler.config_templates.keepass_config.KeepassConfig[source]

Bases: ConfigHierarchy

Read passwords from a keepass database. Performance Note:

The default Key function AES-KDF is very slow in Python. Argon2d is better with Python and still secure. https://keepass.info/help/base/security.html#secdictprotect

Note: A password is still needed to open & decrypt the keepass database. The default source of that password is KEYRING. However, any valid PasswordSource can be used. This allows

Config:
  • validate_default: bool = True

  • validate_assignment: bool = True

  • validate_credentials: bool = True

Fields:
  • alternate_group_names (Dict[str, str])

  • database_path (pathlib.Path)

  • default_group (str | None)

  • keyring_section (str | None)

  • keyring_user_id (str | None)

  • password_source (config_wrangler.config_templates.password_source.PasswordSource)

  • raw_password (str | None)

  • user_id (str)

add_child(name: str, child_object: ConfigHierarchy)

Set this configuration as a child in the hierarchy of another config. For any programmatically created config objects this is required so that the new object ‘knows’ where it lives in the hierarchy – most importantly so that it can find the hierarchies root object.

full_item_name(item_name: str | None = None, delimiter: str = ' -> ')

The fully qualified name of this config item in the config hierarchy.

get_copy(copied_by: str = 'get_copy') ConfigHierarchy

Copy this configuration. Useful when you need to programmatically modify a configuration without modifying the original base configuration.

get_group_contents(group: str) Iterable[ForwardRef('pykeepass.entry.Entry')][source]
get_group_list_contents(group_list: Iterable[str]) Iterable[ForwardRef('pykeepass.entry.Entry')][source]
get_password(group: str | None, title: str | None, user_id: str | None)[source]
model_dump_non_private(*, mode: Literal['json', 'python'] | str = 'python', exclude: Set[str] | None = None) dict[str, Any]
open_database(force_refresh: bool = False) pykeepass.PyKeePass[source]
set_as_child(name: str, other_config_item: ConfigHierarchy)
static translate_config_data(config_data: MutableMapping)

Children classes can provide translation logic to allow older config files to be used with newer config class definitions.