Submodule _types
derivepassphrase._types
¶
Types used by derivepassphrase.
VaultConfigGlobalSettings
¶
Bases: TypedDict
Configuration for vault: global settings.
Attributes:
Name | Type | Description |
---|---|---|
key |
NotRequired[str]
|
The base64-encoded ssh public key to use, overriding the master passphrase. Optional. |
phrase |
NotRequired[str]
|
The master passphrase. Optional. |
unicode_normalization_form |
NotRequired[Literal['NFC', 'NFD', 'NFKC', 'NFKD']]
|
The preferred Unicode normalization form; we warn the user
if textual passphrases do not match their normalized forms.
Optional, and a |
VaultConfigServicesSettings
¶
Bases: VaultConfigGlobalSettings
Configuration for vault: services settings.
Attributes:
Name | Type | Description |
---|---|---|
notes |
NotRequired[str]
|
Optional notes for this service, to display to the user when generating the passphrase. |
length |
NotRequired[int]
|
Desired passphrase length. |
repeat |
NotRequired[int]
|
The maximum number of immediate character repetitions allowed in the passphrase. Disabled if set to 0. |
lower |
NotRequired[int]
|
Optional constraint on ASCII lowercase characters. If positive, include this many lowercase characters somewhere in the passphrase. If 0, avoid lowercase characters altogether. |
upper |
NotRequired[int]
|
Same as |
number |
NotRequired[int]
|
Same as |
space |
NotRequired[int]
|
Same as |
dash |
NotRequired[int]
|
Same as |
symbol |
NotRequired[int]
|
Same as |
VaultConfig
¶
Bases: TypedDict
, _VaultConfig
Configuration for vault.
Usually stored as JSON.
Attributes:
Name | Type | Description |
---|---|---|
global |
NotRequired[VaultConfigGlobalSettings]
|
Global settings. |
services |
Required[dict[str, VaultConfigServicesSettings]]
|
Service-specific settings. |
KeyCommentPair
¶
Bases: NamedTuple
SSH key plus comment pair. For typing purposes.
Attributes:
Name | Type | Description |
---|---|---|
key |
bytes | bytearray
|
SSH key. |
comment |
bytes | bytearray
|
SSH key comment. |
SSH_AGENTC
¶
SSH_AGENT
¶
is_vault_config
¶
is_vault_config(obj: Any) -> TypeGuard[VaultConfig]
Check if obj
is a valid vault config, according to typing.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj |
Any
|
The object to test. |
required |
Returns:
Type | Description |
---|---|
TypeGuard[VaultConfig]
|
True if this is a vault config, false otherwise. |