MockMesh

Your App
intercepted
MockMesh
blocked ✕
Cloud / APIs

An open-source Python library that intercepts boto3, azure-sdk, google-cloud, pymongo, redis, SQL drivers, Kafka, RabbitMQ and HTTP calls at the transport level. Mock 60+ cloud services locally with zero credentials, zero Docker, and zero cost.

Why deploy to the cloud
just to test?

💸

Skyrocketing Dev Bills

Every DynamoDB PutItem, S3 GetObject, or Lambda invocation in dev accumulates real AWS charges. Even mistakes cost money.

🐌

Slow Feedback Loops

Network round-trips to real cloud services add 20–80ms per call. Tight iteration loops become sluggish slogs.

🔒

Credential Hell

IAM roles, access keys, STS sessions — managing auth just to run local tests burns dev time that could ship features.

🌐

Offline Impossible

Spotty WiFi, flight mode, VPN issues — any network problem takes your entire development workflow offline.

Three lines to mock everything

1

Install

bash
pip install mockmesh
2

Initialize

python
import mockmesh
mockmesh.initialize()
3

Use your SDKs normally

python
import boto3

s3 = boto3.client("s3", region_name="us-east-1")
s3.put_object(Bucket="my-bucket", Key="hello.txt", Body=b"Hello")
obj = s3.get_object(Bucket="my-bucket", Key="hello.txt")
print(obj["Body"].read())  # b"Hello"

Common Questions

What is MockMesh?

MockMesh is an open-source Python library that intercepts cloud API calls from AWS (boto3), Azure (azure-sdk), GCP (google-cloud), SQL databases, MongoDB, Redis, Kafka, RabbitMQ, and HTTP endpoints at the transport level. It provides real stateful local mocking of 60+ cloud services with zero credentials and zero cost. Install with pip install mockmesh.

What is the difference between MockMesh and LocalStack?

LocalStack runs actual AWS service emulators in Docker containers. MockMesh intercepts at the Python SDK transport layer — no Docker required. MockMesh also supports Azure, GCP, SQL databases, MongoDB, Redis, Kafka, RabbitMQ and any HTTP endpoint in the same library, with a 4-tier response resolution system, auto-detection, fallback modes, and real file-backed stateful storage.

How does MockMesh compare to Moto?

Moto is an AWS-only mocking library that requires decorators or context managers on each test. MockMesh intercepts at the transport layer with a single initialize() call — no decorators needed. MockMesh also goes beyond AWS to support Azure, GCP, SQL databases, MongoDB, Redis, Kafka, RabbitMQ, and HTTP endpoints in one unified library with real stateful storage.

Does MockMesh require Docker?

No. MockMesh is a pure Python library with zero Docker dependency. Unlike LocalStack or other emulator-based tools, MockMesh intercepts SDK calls at the transport layer within your Python process. Just pip install mockmesh and call initialize() — it runs anywhere Python runs, including CI/CD pipelines, notebooks, and serverless environments.

How do I use MockMesh with pytest?

MockMesh provides pytest integration with session-scoped and per-test isolation. Add a conftest.py fixture that calls mockmesh.initialize() with your desired configuration. Session scope shares state across tests for integration scenarios, while per-test scope gives each test a clean slate.

Is MockMesh stateful?

Yes. Storage-backed operations (S3, DynamoDB, SQS, GCS, Cosmos DB, Service Bus, Key Vault, SSM, SecretsManager, ElastiCache) use real local file-backed stores. MongoDB and Redis use in-memory stores. SQL databases use a SQLite backend. Your application cannot distinguish this from the real cloud.