wsgidav.samples.mongo_dav_providerΒΆ
Description
Implementation of a WebDAV provider that provides a very basic, read-only resource layer emulation of a MongoDB database.
Usage: add the following entries to wsgidav.conf:
from wsgidav.samples.mongo_dav_provider import MongoResourceProvider
mongo_dav_opts = {}
addShare("mongo", MongoResourceProvider(mongo_dav_opts))
Valid options are (sample shows defaults):
opts = {"host": "localhost", # MongoDB server
"port": 27017, # MongoDB port
# This options are used with `mongod --auth`
# The user must be created in the admin db with
# > use admin
# > db.addUser(user_name, password)
"user": None, # Authenticate with this user
"pwd": None, # ... and password
}
Classes
|
Mongo collections, contains mongo documents. |
|
Root collection, lists all mongo databases. |
|
Mongo database, contains mongo collections. |
|
Mongo document, returned as virtual text resource. |
|
DAV provider that serves a MongoDB structure. |
Other Members