pycloudlib.key module
Base Key Class.
- class pycloudlib.key.KeyPair(public_key_path: str | None, private_key_path: str | None = None, name: str | None = None)[source]
Bases:
objectKey Class.
- __init__(public_key_path: str | None, private_key_path: str | None = None, name: str | None = None)[source]
Initialize key class to generate key or reuse existing key.
The public key path is given then the key is stored and the private key is assumed to be named the same minus ‘.pub’ otherwise the user should also specify the private key path.
- Parameters:
public_key_path – Path to public key
private_key_path – Path to private key
name – Name to reference key by in clouds
- property public_key_content
Read the contents of the public key.
- Returns:
The public key content
- Return type:
str