open_vault

open_vault(vault_name:str) -> Vault

Opens a vault based on the given name.

Get data from vault

with open_vault('data') as vault: 
    # Get data from a vault entry
    customers = vault.get('customers')

Modify data in an existing vault

new_customer = {"name": "David"}

with open_vault('data') as vault: 
    customers = vault.get('customers')
    customers.append(new_customer)
    vault.update('customers', customers)

Last updated

Was this helpful?