From 8de1ec5982c71e06ebf19706696411534e694307 Mon Sep 17 00:00:00 2001 From: Siddharth Ravikumar Date: Tue, 27 Jan 2015 21:52:19 -0500 Subject: combox/silo.py: new method `keys()' in ComboxSilo class. --- combox/silo.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/combox/silo.py b/combox/silo.py index cbb2065..b1e59f6 100644 --- a/combox/silo.py +++ b/combox/silo.py @@ -53,13 +53,19 @@ class ComboxSilo(object): return self.db.set(filep, fhash) + def keys(self): + """Returns a list of all keys in db.""" + # this is why Redis or some other key-value DB should be used + # instead of PickleDB + return self.db.db.keys() + + def remove(self, filep): """Removes filep from db. filep: path to the file in combox directory. """ - return self.db.rem(filep) -- cgit v1.2.3