Skip to content

linkdd/link.kvstore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

link.kvstore

link.kvstore is a database agnostic key/value store API.

See documentation for more informations.

License Development Status Latest release Supported Python versions Supported Python implementations Download format Build status Code test coverage Downloads Code Health

Installation

pip install link.kvstore

Features

  • database agnostic
  • dict API to access key/value store

Examples

Getting a backend:

from link.middleware.core import Middleware

# Instanciate a K/V store with Riak backend
store = Middleware.get_middleware_by_uri(
    'kvstore+riak://localhost:8087/mybuckettype/mybucket?protocol=pbc'
)
# Instanciate a K/V store with SQL backend
store = Middleware.get_middleware_by_uri(
    'kvstore+sql://localhost:5432/database/table'
)

Accessing data:

store['foo'] = 'bar'
assert store['foo'] == 'bar'
assert 'foo' in store

for key in store:
    print(key)

del store['foo']

Donating

Support via Liberapay

About

Key/Value store generic API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages