DocStoreClient

class blobstash.docstore.DocStoreClient(base_url=None, api_key=None)

BlobStash DocStore client.

add_attachment(path)

Upload the file at path, and return the key to embed the file as an attachment/filetree pointer.

>>> doc['my_super_text_file'] = client.add_attachment('/path/to/my/text_file.txt')
collection(name)

Returns a Collection instance for the given name.

collections()

Returns all the available collections.

fget_attachment(attachment)

Returns a fileobj (that needs to be closed) with the content off the attachment.