Invenio module that adds filesystem abstraction.

This is an experimental development preview release.


  • Filesystem abstraction using PyFileSystem package.
  • Metadata storage.



Define document API.

Following example shows how to handle documents metadata:

>>> from flask import g
>>> from invenio_base.factory import create_app
>>> app = create_app()
>>> ctx = app.test_request_context()
>>> ctx.push()
>>> from invenio_documents import api
>>> d = api.Document.create({'title': 'Title 1'})
>>> d['title']
'Title 1'
>>> d['creator']
>>> d['title'] = 'New Title 1'
>>> d = d.update()
>>> api.Document.get_document(d['_id'])['title']
'New Title 1'
>>> ctx.pop()

Define exceptions raised by Document API.

exception invenio_documents.errors.DeletedDocument

Document has not been found because it has been previously deleted.

exception invenio_documents.errors.DocumentError

General document exception.

exception invenio_documents.errors.DocumentNotFound

Document has not been found in database.

Indices and tables