Python wrapper for an AWS S3 backed key-value store.
Project description
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
Project details
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 s3-kvs-0.1.3.tar.gz.
File metadata
- Download URL: s3-kvs-0.1.3.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/2.7.18rc1 Linux/5.4.0-37-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca74f6c01d42169a1c6fe2d87a6674311f7237e1aaf4b914bdb7aaad6c070d7f
|
|
| MD5 |
98c841b1002659e485f937e391f25110
|
|
| BLAKE2b-256 |
eaadcd7a2cb2a1a77189a46a3779d5a4a7aa3bb269e5f05e8581765a419cd3e8
|
File details
Details for the file s3_kvs-0.1.3-py3-none-any.whl.
File metadata
- Download URL: s3_kvs-0.1.3-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/2.7.18rc1 Linux/5.4.0-37-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e4a8ab60234ef9945fde734e51ad6e7c3ca8c553210a03944733454f4ffbd18
|
|
| MD5 |
085799a7bf142353170295f41d636875
|
|
| BLAKE2b-256 |
c88166d07b0a56b1f2fcdc1af9bac1e6b5082969af36ac390ebdec73fa9bac78
|