{"id":24082,"library":"mtools","title":"mtools","description":"A collection of useful Python scripts to parse and visualize MongoDB log files (mloginfo, mlogfilter, mplotqueries), launch test MongoDB environments (mlaunch), and reproduce MongoDB issues. Current version is 1.7.2. Release cadence is irregular, with occasional minor/patch releases.","status":"active","version":"1.7.2","language":"python","source_language":"en","source_url":"https://github.com/rueckstiess/mtools","tags":["mongodb","log-analyzer","test-environment","mlaunch"],"install":[{"cmd":"pip install mtools","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Required for mlaunch to interact with MongoDB.","package":"pymongo","optional":false},{"reason":"Used for process management.","package":"psutil","optional":false},{"reason":"Required for mplotqueries.","package":"matplotlib","optional":true}],"imports":[{"note":"mlaunch is a module under mtools, not a top-level package.","wrong":"from mlaunch import mlaunch","symbol":"mlaunch","correct":"from mtools.mlaunch import mlaunch"}],"quickstart":{"code":"from mtools.mlaunch import mlaunch\n# Start a replica set with 3 nodes\nmlaunch.init('replicaset', name='myrepl', nodes=3, auth=False)\nprint('Replica set launched. Use mlaunch.stop() to stop.')","lang":"python","description":"Launch a MongoDB test environment with mlaunch."},"warnings":[{"fix":"Upgrade Python to 3.6+ and install mtools >=1.6.0.","message":"mtools v1.6.0 dropped Python 2.7 support. Python 3.6+ is required. Upgrade Python if you are on an older version.","severity":"breaking","affected_versions":"<1.6.0"},{"fix":"Upgrade PyMongo to 4.0+ or pin mtools to 1.7.0 if you must use PyMongo 3.x.","message":"mtools v1.7.1 requires PyMongo >=4.0. Older PyMongo versions are incompatible. This may break scripts relying on PyMongo 3.x API.","severity":"breaking","affected_versions":">=1.7.1"},{"fix":"Ensure MongoDB tools are installed and mongod is in your PATH.","message":"mlaunch requires a mongod binary available in PATH. If not found, it fails silently or with confusing errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace --sslWeakCertificateValidation with --tlsAllowInvalidCertificates.","message":"mlaunch's --sslWeakCertificateValidation is removed in v1.6.2. Use --tlsAllowInvalidCertificates instead.","severity":"deprecated","affected_versions":">=1.6.2"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from mtools.mlaunch import mlaunch' instead.","cause":"Attempting to import mlaunch directly from the top-level package.","error":"ModuleNotFoundError: No module named 'mlaunch'"},{"fix":"Run 'pip install pymongo>=4.0' or downgrade mtools to 1.7.0.","cause":"PyMongo is not installed or is an incompatible version (<4.0 for mtools>=1.7.1).","error":"pkg_resources.DistributionNotFound: The 'pymongo' distribution was not found and is required by mtools"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}