Skip to main content

s3-kvs

A python wrapper for an S3 backed key-value store.

Usage

Import and create a client instance, setting a domain and optionally a namespace:

from s3_kvs import ReadOnlyClient

client = ReadOnlyClient(domain=’kvs.example.com’)

OR

client = ReadOnlyClient(domain=’kvs.example.com’, namespace=’test’)

Then use then use the getitem notation to retrieve values from the key store:

client[‘foo’]

> ‘bar’

Or, use the get method to provide a default if no matching value is found:

client.get(‘foo’, ‘oops’)

> ‘oops’

By default returned values are text. You can also treat them as json and automatically parse them:

text_client = ReadOnlyClient(domain=’kvs.example.com’)

client[‘foo’]

> ‘{“bar”: “baz”}’ # a json string

json_client = ReadOnlyClient(domain=’kvs.example.com’, value_format=’json’)

client[‘foo’]

> {‘bar’: ‘baz’} # a python dict

Release files for s3-kvs 0.1.3

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

Source distribution (sdist)

Source distribution for s3-kvs 0.1.3
File Size Uploaded
s3-kvs-0.1.3.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for s3-kvs 0.1.3
File Interpreter ABI Platform
s3_kvs-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 5.6 kB

Release files / s3-kvs-0.1.3.tar.gz

Download URL s3-kvs-0.1.3.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ca74f6c01d42169a1c6fe2d87a6674311f7237e1aaf4b914bdb7aaad6c070d7f
BLAKE2b-256 checksum
How to use checksums
eaadcd7a2cb2a1a77189a46a3779d5a4a7aa3bb269e5f05e8581765a419cd3e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/2.7.18rc1 Linux/5.4.0-37-generic

Release files / s3_kvs-0.1.3-py3-none-any.whl

Download URL s3_kvs-0.1.3-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e4a8ab60234ef9945fde734e51ad6e7c3ca8c553210a03944733454f4ffbd18
BLAKE2b-256 checksum
How to use checksums
c88166d07b0a56b1f2fcdc1af9bac1e6b5082969af36ac390ebdec73fa9bac78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/2.7.18rc1 Linux/5.4.0-37-generic

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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