Alpha v0.3.0a40 — the Python API surface is still settling and may shift between point releases. WiredTiger on-disk format is stable, but there's no migration tool yet — don't put production data here.
SecantusDB — the SQLite of document databases

Embeddable Document Database compatible with MongoDB.

SecantusDB is a real MongoDB server written in Python: it speaks the MongoDB wire protocol on the same TCP socket a mongod would, so any standard driver — pymongo, mongo-go-driver, mongosh, mongodump — connects unchanged. Backed by the same WiredTiger engine MongoDB uses.

Why SecantusDB

Build for full production use (eventually) right now use it as a cheap and easy clone for test and dev environments.

Drop-in wire protocol

Speaks MongoDB OP_MSG / OP_QUERY on a real TCP socket. pymongo, the Go driver, mongosh, and mongodump all connect with no code changes.

Single-node by design

No replica sets, no sharding, no cluster topology to model. Within single-node scope SecantusDB is a faithful surrogate — same handshake, same error codes.

Python-native & embeddable

Start a server in two lines from any test or app. No mongod to install, no port juggling, parallel-test friendly. Or run it as a standalone daemon (secantusdb).

Real WiredTiger storage

The same C library MongoDB ships with, vendored and built into the wheel. B-trees, page eviction, write-ahead logging, durability — all real.

CRUD, aggregation, change streams, indexes

Not a mock. Full pipeline ($match through $facet), oplog-backed change streams with resume tokens, compound & partial & geo (2d/2dsphere) indexes.

Conformance-tested

Validated against the unmodified pymongo, mongo-go-driver, mongo-node-driver, and mongo-java-driver test suites. The pass rates are the honest compatibility gauge.

Drop-in for pymongo

Same wire protocol, same handshake, same error codes. The application code is byte-identical — only the setup line changes.

Normal MongoDB requires mongod running on :27017
from pymongo import MongoClient

client = MongoClient("mongodb://localhost:27017")
db = client["mydb"]
db["users"].insert_one({"_id": 1, "name": "Joe"})
assert db["users"].find_one({"_id": 1})["name"] == "Joe"
Embedded SecantusDB no external process — in your test or app
from pymongo import MongoClient
from secantus import SecantusDBServer

with SecantusDBServer(port=27017) as server:
    client = MongoClient(server.uri)
    db = client["mydb"]
    db["users"].insert_one({"_id": 1, "name": "Joe"})
    assert db["users"].find_one({"_id": 1})["name"] == "Joe"