Created
September 24, 2012 00:33
-
-
Save mekarpeles/3773581 to your computer and use it in GitHub Desktop.
Example of lazydb multiple keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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