Vault package designed for use with the Dallas Formula Racing secret vault.
Project description
vpkg — VaultClient
Overview
vpkg is a lightweight wrapper for interacting with, and implementing the Vault API utilized by Dallas Formula Racing. It provides many of the existing API endpoints as easy-to-use Python functions.
Installation
Install latest version via pip:
pip install vpkg
Usage
from vpkg import VaultClient
# Create a client
vc = VaultClient(env_key="your-env-key", product_name="myproduct", api_key="your-api-key")
# Fetch the full vault for the default or given product
vault_data = vc.fetch_vault()
# Fetch an individual secret
secret_value = vc.fetch_secret("DB_PASSWORD")
# List available products
products = vc.fetch_products()
# Get metadata
meta = vc.fetch_metadata()
# Create a vault (returns the x-env-key from the response)
new_env_key = vc.create_vault(vault_data={"KEY": "value"}, product_name="myproduct")
# Bulk update secrets
vc.bulk_update_secrets({"API_KEY": "newvalue", "ANOTHER": "v"})
# Convenience single-secret operations
vc.update_secret("API_KEY", "anothervalue")
vc.create_secret("NEW_SECRET", "value")
vc.delete_secret("OLD_SECRET")
Requirements
- Python 3.8+
- requests (test with the same version you use in your environment)
Quick test snippet
Save and run a small script to validate connectivity (replace placeholders):
from vpkg import VaultClient
c = VaultClient(env_key="ENV_KEY_HERE", product_name="myproduct")
try:
print("Products:", c.fetch_products())
print("Metadata:", c.fetch_metadata())
except Exception as e:
print("Vault request failed:", e)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vpkg-1.0.1.tar.gz.
File metadata
- Download URL: vpkg-1.0.1.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8a2a2f761d5826efde85249fa2f9c93a14bd178c816d99ae2d117947cb92b04
|
|
| MD5 |
06372828e1fd1b4af632c2a7281f419c
|
|
| BLAKE2b-256 |
70785db856e13bfea9bd095a6cc915e9b72e31c0960158856b033b0b73dc6d35
|
File details
Details for the file vpkg-1.0.1-py3-none-any.whl.
File metadata
- Download URL: vpkg-1.0.1-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbf82c54aab20056ae785fc296806144784f49cf2172afbe8c7f00224da716a3
|
|
| MD5 |
fa5ca0add9f11f401b54c628cec60c68
|
|
| BLAKE2b-256 |
b6d01357ab7ca64eb49f53682540214e4aa57b76df4196abaf783dd23bab88ae
|