util.credentials
Functions to fetch and store spacetrack credentials on the system.
fetchConfigCredentials
fetchConfigCredentials(config: ConfigParser) → dict[str, str | None]
Fetch spacetrack credentials from config file.
Args:
config
: ConfigParser object containing config fieldsReturns: dict containing username and password
fetchKeyringCredentials
fetchKeyringCredentials() → dict[str, str | None]
Fetch spacetrack credentials from system keyring.
Returns: dict containing username and password
Raises:
ValueError
: If no system keyring existsstoreCredentials
storeCredentials(user: None | str = None, passwd: None | str = None) → bool
Store spacetrack credentials in system keyring.
Can set either username or password, but can’t set a password without a username
Args:
user
: [optional] username stringpasswd
: [optional] password stringReturns: True if successfully stored
Raises:
KeyError
: raised if trying to store a password without a usernamecreateCredentials
createCredentials()
Script helper function to create and store credentials.
Called by command line script. Requires user input.
This file was automatically generated via lazydocs.