Comparison
mongomock vs mongomock-ng vs mongorun vs pymongo_inmemory
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
Fake pymongo stub for testing simple MongoDB-dependent code
Low maintenance activity. Last release over 2 years ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install mongomockReplacement fake pymongo stub for testing simple MongoDB-dependent code
Maintained. Last release 4 months ago, commits in 4 of the last 26 weeks. Weaker on commit activity and contributor spread.
pip install mongomock-ngA utility to quickly set up complex MongoDB test environments on a local machine
Actively maintained. Last release 3 weeks ago, commits in 5 of the last 26 weeks. A safe choice.
pip install mongorunA mongo mocking library with an ephemeral MongoDB running in memory.
Low maintenance activity. Last release 21 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install pymongo-inmemoryIn short
- mongomock is the most used: 10M downloads a month, 65× more than mongomock-ng.
- mongorun is better maintained: Pythie’s Index 71 against 17.
- mongorun is growing fastest: downloads +94472% over the last month.
- mongorun is the newcomer: first released Apr 2026.
Side by side
| Metric | mongomock | mongomock-ng | mongorun | pymongo_inmemory |
|---|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 17 | 63 |