Skip to main content

kvs3

kvs3 is a tool for managing environment configuration values. It is intended for use with aws environments and uses an s3
bucket as a general key/value store.

Installing

$ pip install kvs3

Authenticating

kvs3 assumes running in an environment with an authenticated AWS user which has the appropriate permission to read/write
values to an s3 bucket used as the key/value store. Uses boto3 authentication method hierarchy in attempting aws access.

Setting up s3

Any s3 bucket can be used, but recommend configuring a bucket with versioning and server-side encryption. Kvs3 will use
the following sources (in order) to determine the s3 bucket name:

  • --bucket flag included in parameters
  • shell Environment var KVS3_BUCKET
  • Run $ kvs3 init and provide bucket name. Written to .kvs3 file used by kvs3 to find bucket

Usage

Writing Keys

$ kvs3 write <service> <key> <value|->

This command will write a value to a key in s3 under the service path.

Example:

$ kvs3 --bucket my-key-value-store write my-app-env min-nodes 3

Will create an object in the s3 bucket named my-key-value-store with the name my-app-env/min-nodes and the contents 3.

Listing Keys

$ kvs3 list <service>
KEY           SIZE  MODIFIED
min-nodes     3     2019-06-27 23:37:48
max-nodes     10    2019-06-30 23:28:52

list will show the key names for a given service, along with other the size in bytes of the value and the date when
the key was last modified.

Reading Keys

$ kvs3 read <service> <key>
`read` outputs the value of a single configuration key.

Setting shell environment with multiple key values

The setenv command is used as part of a deployment pipeline to setup runtime environment variables for use in a
deployment pipeline. Create a keyfile with a simple list of key values, such as:

$ cat <<EOF > env.vars
MIN_NODES
MAX_NODES
DOCKER_REGISTRY

Now, use setenv to create the output used by bash source to define Environment variables.

$ kvs3 setenv my-app-env env.vars > local.env

Results in local.env containing the following example contents:

# source my-app-env environment config  
export MIN_NODES=3
export MAX_NODES=5
export DOCKER_REGISTRY=quay.io

This file can be used $source local.env in a linux environment to create the environment configuration values used
by a deployment pipeline.

Metadata

Release files for kvs3 0.0.5

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

Source distribution (sdist)

Source distribution for kvs3 0.0.5
File Size Uploaded Provenance
kvs3-0.0.5.tar.gz 4.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for kvs3 0.0.5
File Interpreter ABI Platform
kvs3-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / kvs3-0.0.5.tar.gz

Download URL kvs3-0.0.5.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1582cc40e53a7406b60ad77938e3ff734bf340a0d03a376f73b9c9547dc63be8
BLAKE2b-256 checksum
How to use checksums
56638a9173d0998605e9af6ba512d2df48de838272b26e89d81869202a244831
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / kvs3-0.0.5-py3-none-any.whl

Download URL kvs3-0.0.5-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b170aa7f27e7877d2a8e2d4ff62c2de33ecb1b9c816508fd3c47b73d1db907db
BLAKE2b-256 checksum
How to use checksums
bcae936aceaf497e29adce14481ab684002d5313d9c768f8ff67b74d863cbc0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Security for kvs3 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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