Every service intercepts real SDK calls and performs the operation locally. Click any service to see all supported operations.
MockMesh intercepts 6 Python SQL drivers at the connect() level, routing all queries to a local SQLite backend. Full DB-API 2.0 support: CREATE TABLE, INSERT, SELECT, UPDATE, DELETE, JOIN, WHERE, ORDER BY, LIMIT, and stored procedures. Works with psycopg2, psycopg, pymysql, mysql-connector-python, asyncpg, and aiomysql.
All SQL operations execute against a local SQLite database at .mockmesh/sql/mockmesh.db. Schema and data persist between runs.
MockConnection and MockCursor implement the DB-API 2.0 spec. Transactions, cursors, fetchone/fetchall, parameterized queries all work.
asyncpg and aiomysql intercepted with async/await support. Same SQLite backend, fully non-blocking API surface.
No connection strings needed. Any host, port, or database name works — all queries route to the local SQLite instance.
MockMesh intercepts pymongo and redis-py at the client level. MongoDB uses an in-memory document store with full query operator support ($eq, $gt, $in, $regex, $and, $or). Redis uses an in-memory key-value store with support for strings, hashes, lists, sets, and key management.
$eq, $gt, $gte, $lt, $in, $regex, $and, $or, $not all supported. Cursors, aggregation pipeline, and create_index work as expected.
Strings (get/set/incr), hashes (hset/hget/hgetall), lists (lpush/rpush/lpop/rpop), sets (sadd/smembers), and key operations (expire/ttl/rename).
Data persists within a MockMesh session. Use the context manager for per-test isolation, or share state across a session fixture.
pymongo.MongoClient() and redis.Redis() work unchanged. No connection strings or server processes needed.
MockMesh intercepts all major queue, pub/sub, and event streaming protocols across AWS, Azure, GCP, Kafka, and RabbitMQ. SQS and SNS route through the botocore transport patch. Kafka uses confluent-kafka and kafka-python producer/consumer monkey-patches. RabbitMQ uses a pika BlockingConnection patch. GCP Pub/Sub routes through HTTP dispatch. Messages persist to local stream files — seeded rules and runtime messages are merged automatically.
SQS and SNS messages written to .mockmesh/nosql/sqs_<queue>.json. RabbitMQ and Kafka rules configured via responses_path= folder (kafka.json / rabbitmq.json).
Kafka: configure produce offset, partition, and consume body per topic. RabbitMQ: configure delivery_tag and consume body per queue/exchange pair.
Call SQS PurgeQueue at any time to atomically clear a queue. Verified against storage — assert len(after)==0 works correctly.
Kafka: confluent-kafka and kafka-python both intercepted. RabbitMQ: pika BlockingConnection patched. SQS/SNS: botocore transport patched. GCP Pub/Sub: HTTP dispatch.
MockMesh intercepts any HTTP endpoint via glob-pattern and substring URL matching. Add rules to http.json — no code changes, works with any library using requests or urllib. Ships with built-in catch-all rules per HTTP method, so even unmatched URLs return realistic responses.
{
"rules": [
{
"description": "Stripe charges — glob pattern",
"match": { "url": "https://api.stripe.com/v1/charges*", "method": "POST" },
"response": {
"status": 200,
"headers": { "Content-Type": "application/json" },
"body": { "id": "ch_mock_001", "status": "succeeded", "amount": 2000 }
}
},
{
"description": "SendGrid send mail",
"match": { "url": "https://api.sendgrid.com/v3/mail*", "method": "POST" },
"response": { "status": 202, "headers": {}, "body": {} }
},
{
"description": "All Slack webhooks — url_contains",
"match": { "url_contains": "hooks.slack.com", "method": "*" },
"response": {
"status": 200,
"body": { "ok": true }
}
},
{
"description": "Google OAuth token exchange",
"match": { "url": "*oauth2.googleapis.com/token*", "method": "POST" },
"response": {
"status": 200,
"body": { "access_token": "mock_token", "expires_in": 3599, "token_type": "Bearer" }
}
}
]
}GET → 200, POST → 201 with mock ID, PUT → 200, DELETE → 204. Ready out of the box.
Returns { "status": "ok", "mocked": true } — 200 by default.
Returns { "requests_per_sec": 42.5, "latency_ms": 12 } — 200 by default.
POST returns { "id": "pay_mock_001", "status": "succeeded" } — 200 by default.
GET → 200, POST → 201, PUT → 200, PATCH → 200, DELETE → 204. Every unmatched URL still gets a realistic response.
*/api.stripe.com/**/api.sendgrid.com/v3/mail**/api.twilio.com/*url_contains: "hooks.slack.com"*/api.github.com/**oauth2.googleapis.com/token*url_contains: "okta.com"*/api.pagerduty.com/*url_contains: "datadoghq.com"*/api.hubapi.com/*"*/v1/charges*" matches any host with that path. Supports *, ?, and [seq] wildcards via Python fnmatch.
Use "url_contains": "stripe.com" to match any URL containing that substring — no wildcards needed.
Set "method": "POST" to match only POST, or "*" to match all verbs. Different status codes per method (201 for POST, 204 for DELETE).
Rules evaluated top-to-bottom: user overrides → folder overrides → built-in defaults → generic fallback.
User config (config_path) → folder overrides (.mockmesh/http.json) → built-in defaults → generic fallback { mocked: true }.