# pymongo_inmemory

PyPI version

A Python library that provides an in-memory MongoDB server that can be used during integration tests.

You can install it from PyPI

pip install pymongo-inmemory

Rather that providing a stub of the database, pymongo_inmemory uses a real MongoDB server configured to use in memory storage. This lets you easily manage the database during integration tests, including CI environments. It downloads the mongo binary from the official MongoDB servers and starts a mongod process that is kept alive during the test.

You have control over which exact MongoDB version is downloaded, so you can be sure you use the same version during your tests that during production.

Have you written similar tests in Node.js? You might have come across libraries such as mongodb-memory-server or mockgo which inspired pymongo_inmemory!

Check it on GitHub:

kaizendorks/pymongo_inmemory - GitHub