Registry / database / mtools

mtools

JSON →
library1.7.2pypypi✓ verified 80d ago

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.

pip install mtools
INSTALL
IMPORT
SIG · MTOOLS
M
mtools
databasepythonv1.7.2
Install
1.7s avg
Import
Disk
24MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.7.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 26MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 26MB
24MB installed
● package 24MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mlaunch
from mtools import mlaunch
from mtools.mlaunch import mlaunch

Launch a MongoDB test environment with mlaunch.

from mtools.mlaunch import mlaunch # Start a replica set with 3 nodes mlaunch.init('replicaset', name='myrepl', nodes=3, auth=False) print('Replica set launched. Use mlaunch.stop() to stop.')
mloginfo --version
Debug
Known issues
breakingmtools v1.6.0 dropped Python 2.7 support. Python 3.6+ is required. Upgrade Python if you are on an older version.
fix
Upgrade Python to 3.6+ and install mtools >=1.6.0.
affects: <1.6.0
breakingmtools v1.7.1 requires PyMongo >=4.0. Older PyMongo versions are incompatible. This may break scripts relying on PyMongo 3.x API.
fix
Upgrade PyMongo to 4.0+ or pin mtools to 1.7.0 if you must use PyMongo 3.x.
affects: >=1.7.1
gotchamlaunch requires a mongod binary available in PATH. If not found, it fails silently or with confusing errors.
fix
Ensure MongoDB tools are installed and mongod is in your PATH.
affects: all
deprecatedmlaunch's --sslWeakCertificateValidation is removed in v1.6.2. Use --tlsAllowInvalidCertificates instead.
fix
Replace --sslWeakCertificateValidation with --tlsAllowInvalidCertificates.
affects: >=1.6.2
Upgrade
Version history
1.7.2latest on PyPI · released Nov 8, 2022
Audit
Dependencies
pymongorequiredRequired for mlaunch to interact with MongoDB.
psutilrequiredUsed for process management.
matplotliboptionalRequired for mplotqueries.
Agent activity
4 hits · last 30 days
node
4
Resources
mtools — pip install mtools · libregistry