MBE is a backend written in Python 3 that provides database access, authentication, access control and other features on top of the MongoDB document database.


License
BSD-3-Clause
Install
pip install mbe==0.7.8

Documentation

DO NOT USE, THIS LIBRARY HAS BEEN MOVED INTO OPTIMAL PLATFORM

MBE - The Mongo Back End (THIS LIBRARY IS BEING MOVED INTO OPTIMAL PLATFORM)

Is a back end written in Python 3 that provides cross platform database access, authentication, access control and other features on top of the MongoDB document database.

Features:

  • Schema-based structure
  • Permissions
  • Rights
  • Groups
  • Authentication
  • Logging
  • Change history
  • A tree structure
  • Web server plugins(so far CherryPy)

Upcoming features:

  • Change log entries should be able to track using propertyIds: https://github.com/OptimalBPM/mbe/issues/1.
  • Schema diff based upgrade mechanism: https://github.com/OptimalBPM/mbe/issues/2
    Will be able handle many database structural upgrade scenarios by comparing propertyIds in before-and-after schemas.
  • Foreign keys: https://github.com/OptimalBPM/mbe/issues/4
    Sort of. It should not be possible save a document with fields pointing to nodes of the wrong schema type.
  • Error Ids: https://github.com/OptimalBPM/mbe/issues/3
    Instead of raising internal errors, error messages are saved to storage and only the storage document Ids are returned.
    This makes it possible to give an error code for the user that can be verbose and understandable to the support personnel but doesn't reveal any internal information about the system to a user/attacker.

Note that these proposed data integrity features are not the complete and guaranteed kind found in relational databases.
However, most cases should be handled and very few problems should arise from the few cases not covered.
And when not covered, the initial state could be reliably restored.
Many standards requirements otherwise implicitly requiring continuous integrity could be met in this manner.

Documentation

Example

There is an example in the repository in the examples folder, it basically consist of a server script and a client web page.
Start the server.py and surf into https://127.0.0.1:8080 and try it out.

With regards to dependencies, the cherrypy, json schema, bson, decorator and pymongo are required.
And of course a local MongoDB installation.

It will use misc/init.py to init a new database called Test_MBE when it starts.
Not likely, but if you actually have a database called Test_MBE it will be dropped.

There is also a demo of a full, angular based mbefe implementation at https://demo.optimalbpm.se:8080/ It is a dynamic, JSON-schema validated front end to MBE.

Support

If you have a problem, please do not hesitate to register an issue at https://github.com/OptimalBPM/mbe/issues

Contributing

Please contribute! Either by submitting pull requests or registering issues

Testing

MBE employs BDD-style testing, please look at mbe/features for tests.

Installation

These are the options for installing mbe.

Repository

If you want all the code, including examples, and want to contibute, you will need to clone the repository.

sudo apt-get install git
git clone https://github.com/OptimalBPM/mbe.git

PyPI

Except from cloning this repository, MBE is available via PyPi:

pip3 install mbe

(Examples are not included in the pip distribution)

.deb-packages

Add these lines to your system's software sources:

deb http://ppa.launchpad.net/nicklasb/mbe/ubuntu trusty main 
deb-src http://ppa.launchpad.net/nicklasb/mbe/ubuntu trusty main 

And then run:

sudo apt-get update
sudo apt-get install python3-mbe