Commits

Ronny Pfannschmidt  committed 538741a

extend docs

  • Participants
  • Parent commits 137e032

Comments (0)

Files changed (2)

File bmst/store.py

+"""
+    Basic Store APIS
+    ~~~~~~~~~~~~~~~~
+
+    in general a store is a mutable mapping that will not allow delete
+"""
+
+
 import py
 import collections
 import json
 
 
 class BaseStore(collections.MutableMapping):
+    """
+    convience base class implementing osme defualt methods for stores
+    """
     def __len__(self):
         return len(self.keys())
 
 
 
 class FileStore(BaseStore):
+    """
+    stores items within a directory
+
+    :param path: a `py.path.local` instance of the directory
+    """
     def __init__(self, path):
         self.path = path
 
 
 
 class Httplib2Store(BaseStore):
-    def __init__(self, base):
+    """
+    http using store
+
+    uses get/put
+
+    :param url: the url to use
+    """
+    def __init__(self, url):
         import httplib2
         self.http = httplib2.Http()
-        self.url = base
+        self.url = url
 
     def __getitem__(self, key):
         headers, content = self.http.request(self.url + key)

File docs/api.rst

 
 
 .. automodule:: bmst.store
+  :members: