Python pymongo.version() Examples
The following are 5
code examples of pymongo.version().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
pymongo
, or try the search function
.
Example #1
Source File: mongodb_replication.py From ansible-role-mongodb with GNU General Public License v2.0 | 5 votes |
def check_compatibility(module, client): srv_info = client.server_info() if LooseVersion(PyMongoVersion) <= LooseVersion('3.2'): module.fail_json(msg='Note: you must use pymongo 3.2+') if LooseVersion(srv_info['version']) >= LooseVersion('3.4') and LooseVersion(PyMongoVersion) <= LooseVersion('3.4'): module.fail_json(msg='Note: you must use pymongo 3.4+ with MongoDB 3.4.x') if LooseVersion(srv_info['version']) >= LooseVersion('3.6') and LooseVersion(PyMongoVersion) <= LooseVersion('3.6'): module.fail_json(msg='Note: you must use pymongo 3.6+ with MongoDB 3.6.x')
Example #2
Source File: mongodb.py From addons-source with GNU General Public License v2.0 | 5 votes |
def get_summary(self): """ Return a dictionary of information about this database backend. """ summary = super().get_summary() summary.update({ _("Database version"): version, }) return summary
Example #3
Source File: random_hyperopt_august2013_mod.py From HPOlib with GNU General Public License v3.0 | 5 votes |
def check_dependencies(self): try: import nose self.logger.debug("\tNose: %s\n" % str(nose.__version__)) except ImportError: raise ImportError("Nose cannot be imported. Are you sure it's " "installed?") try: import networkx self.logger.debug("\tnetworkx: %s\n" % str(networkx.__version__)) except ImportError: raise ImportError("Networkx cannot be imported. Are you sure it's " "installed?") try: import pymongo self.logger.debug("\tpymongo: %s\n" % str(pymongo.version)) from bson.objectid import ObjectId except ImportError: raise ImportError("Pymongo cannot be imported. Are you sure it's" " installed?") try: import numpy self.logger.debug("\tnumpy: %s" % str(numpy.__version__)) except ImportError: raise ImportError("Numpy cannot be imported. Are you sure that it's" " installed?") try: import scipy self.logger.debug("\tscipy: %s" % str(scipy.__version__)) except ImportError: raise ImportError("Scipy cannot be imported. Are you sure that it's" " installed?")
Example #4
Source File: hyperopt_august2013_mod.py From HPOlib with GNU General Public License v3.0 | 5 votes |
def check_dependencies(self): try: import nose self.logger.debug("\tNose: %s\n" % str(nose.__version__)) except ImportError: raise ImportError("Nose cannot be imported. Are you sure it's " "installed?") try: import networkx self.logger.debug("\tnetworkx: %s\n" % str(networkx.__version__)) except ImportError: raise ImportError("Networkx cannot be imported. Are you sure it's " "installed?") try: import pymongo self.logger.debug("\tpymongo: %s\n" % str(pymongo.version)) from bson.objectid import ObjectId except ImportError: raise ImportError("Pymongo cannot be imported. Are you sure it's" " installed?") try: import numpy self.logger.debug("\tnumpy: %s" % str(numpy.__version__)) except ImportError: raise ImportError("Numpy cannot be imported. Are you sure that it's" " installed?") try: import scipy self.logger.debug("\tscipy: %s" % str(scipy.__version__)) except ImportError: raise ImportError("Scipy cannot be imported. Are you sure that it's" " installed?")
Example #5
Source File: mongo.py From integrations-core with BSD 3-Clause "New" or "Revised" License | 5 votes |
def get_library_versions(cls): return {'pymongo': pymongo.version}