Skip to content

Instantly share code, notes, and snippets.

@mekarpeles
Created September 24, 2012 00:33
Show Gist options
  • Save mekarpeles/3773581 to your computer and use it in GitHub Desktop.
Save mekarpeles/3773581 to your computer and use it in GitHub Desktop.
Example of lazydb multiple keys
mek@apollo:~$ python
Python 2.7.3 (default, Apr 20 2012, 22:39:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from lazydb.lazydb import Db
>>> db = Db('test')
>>> db.put('a', '1')
'1'
>>> db.put('b', '1')
'1'
>>> db.get('a')
'1'
>>> db.get('b')
'1'
>>> db.append('a', '2')
['1', '2']
>>> db.get('a')
['1', '2']
>>> db.get('b')
'1'
>>> db.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment