Created
April 6, 2012 12:35
-
-
Save jbenet/2319348 to your computer and use it in GitHub Desktop.
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
>>> from datastore import * | |
>>> d = DictDatastore() | |
>>> d.put(Key('/abcd/type:pdf'), 'pdf') | |
>>> d.put(Key('/abcd/type:html'), 'html') | |
>>> d.put(Key('/abcd/metadata'), 'metadata') | |
>>> list(d.query(Query(Key('/abcd/type')))) | |
['html', 'pdf'] | |
>>> list(d.query(Query(Key('/abcd')))) | |
['metadata'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment