1. Ronny Pfannschmidt
  2. bmst


Ronny Pfannschmidt  committed 4fb4dbe

more docstrings

  • Participants
  • Parent commits a2e3e39
  • Branches default

Comments (0)

Files changed (1)

File bmst/utils.py

View file
 def get_bmst(path):
+    """
+    make a simple bmst inance by choosing between http/paths and joining them with blibs/meta for the subitems
+    """
     if path.startswith('http'):
         path = path.rstrip('/')
         blobs = Httplib2Store(path + '/blobs/')
 def sync(target, sources):
+    """
+    pull new meta items from all given sources
+    it shouldnt be interupted, since it syncs meta items first
+    unless the blobs get synced as well there will be missing references
+    the idea behind this order is that orphan blobs after a complete sync are better than mising blobs
+    """
     for source in sources:
         print('pulling from', source)
         other = get_bmst(source)
 def extract(bmst, key, target):
+    """
+    load the metadata at key and extract it to target
+    """
     print('extracting to', target)
     target = py.path.local(target)
     meta = bmst.load_meta(key=key)