// developer tool
Define your API in JSON. mock-me spins up a fully functional FastAPI server with realistic fake data, conditional responses, delays, errors, and auto-generated Swagger docs.
// workflow
From zero to a fully running API server with Swagger UI in under a minute.
01
Define endpoints, response schemas, HTTP methods, delays, and error cases. No Python required — just JSON.
02
mock-me parses your config, registers all routes, and boots a live FastAPI server with hot-reload.
03
Your frontend calls real HTTP endpoints. Realistic fake data, pagination, and Swagger UI are all ready instantly.
// capabilities
Built for the gap between design mockups and a real backend.
Strings become names, emails, sentences. Numbers get ranges. Dates are realistic timestamps. Arrays have configurable lengths. All driven by Faker.
40+ faker typesReturn different status codes and bodies based on path params, query strings, request body fields, or headers. First match wins.
path · query · body · headerInject failures by probability (5% 503s) or by condition (locked@example.com → 403). Test your error handling before the real backend exists.
probability · trigger
Set paginated: true on any endpoint. Automatic
page/size/total/hasNext envelope. Configurable field names and max
page sizes.
Global, per-endpoint, or per-response delays. Simulate real-world network conditions during frontend development without a real backend.
global · endpoint · responseSet a seed for fully reproducible fake data across runs. Perfect for snapshot testing — same config, same seed, same data every time.
reproducible
Register custom Python data generators in a plugin file. Expose a
GENERATORS dict and reference your types directly in
the config JSON.
Run with --reload and the file watcher detects config
changes. Routes update without restarting the server manually.
Generate a zero-dependency server.py that only needs
fastapi + uvicorn + faker. Share it without mock-me installed.
// config schema
Intuitive, human-readable config. No boilerplate, no code — just describe what you want.
{{variable}} syntax. Resolves path params, query
params, body fields, or any Faker method.
"paginated": true on any GET endpoint.
Responses are automatically wrapped with page, size, total,
hasNext, and hasPrev fields.
GENERATORS dict. Register
custom types like "product_sku" or
"geo_point" and use them in any schema.
// sample config
Included sample_config.json gives you a full e-commerce
backend in one file.
// cli reference
Everything runs through the mock-me CLI — or prefixed
with pdm run.
Boot the server. Console shows routes, timestamps, and response codes in real time.
Parse and validate a config file without starting the server. Lists all registered endpoints.
Generate a self-contained FastAPI file requiring only fastapi, uvicorn, and faker. No mock-me dependency.
Write a starter config.json to disk based on the
sample e-commerce template.
// data engine
Every type generates contextually appropriate values. Just set
"faker": "type_name" on any string field.
// extensibility
Drop a Python file with a GENERATORS dict. Reference
it in your config's "plugins" array. Your custom type
names become first-class field types.
GENERATORS in your plugin file — a dict
mapping type names to callables.
"plugins": ["./my_plugin.py"] in the
top-level config, then "type": "product_sku" in
any body field.
--reload to
pick up plugin + config changes together.
// get started
Install with PDM, point it at a config, and your frontend has a real API to talk to — before a single line of backend code exists.