Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

DS Vault Python SDK

Features

  • GetSecret
  • TTL + LRD Cache (KEK & records)
  • Psql and Memory repositories

Quickstart

Install

With postgres:

pip install "ds-vault-py-sdk[postgres]"

Memory only:

pip install ds-vault-py-sdk

Usage

Postgres - plain:

from vault import DSVaultClient
from vault.repositories.postgres import PostgresSecretRepository

repo = PostgresSecretRepository(
    dsn="postgresql://user:pass@host:5432/db",
    table="public.secrets",
)

client = DSVaultClient(repository=repo)

secret_bytes = client.get_secret(key=key)
print(secret_bytes.decode())

Managed KMS context:

client = DSVaultClient(
    repository=repo,
    encryption_context_defaults={"app": "payments-api", "env": "prod"},
)

Tests

Execute tests by setting environment variables to manage import paths, and call pytest.

export PYTHONPATH="src"
pipenv run pytest

Environment

Currently support dev and prod environment, defined by setting environment variable BUILDING_MODE, e.g.:

export BUILDING_MODE="dev"

Metadata

Release files for ds-vault-py-sdk 1.0.0b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ds-vault-py-sdk 1.0.0b1
File Size Uploaded
ds_vault_py_sdk-1.0.0b1.tar.gz 14.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ds-vault-py-sdk 1.0.0b1
File Interpreter ABI Platform
ds_vault_py_sdk-1.0.0b1-py3-none-any.whl Python 3 none any Details

Total release size: 29.3 kB

Release files / ds_vault_py_sdk-1.0.0b1.tar.gz

Download URL ds_vault_py_sdk-1.0.0b1.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5d6a899e8fc706d5a9d8ce9a7680b50fe13847686f25f5b15d02b2f73ec6779b
BLAKE2b-256 checksum
How to use checksums
dc71663664e0aaa80a21d0d93f1b1873b2aa52c7f4a1b2d0029cc682a1ae348f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / ds_vault_py_sdk-1.0.0b1-py3-none-any.whl

Download URL ds_vault_py_sdk-1.0.0b1-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2ea349b55a87cb659173a465931d54a85641e7ddca918e75701012e66d4d6a4
BLAKE2b-256 checksum
How to use checksums
71a3fe3ce6829249a47fe3581bbfb17ea316371be2d2f0cf21bde930284c8ca3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.0.0b1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page