PyForge is sold only here, on the official py-forge.com website — beware of imitations.

Back to the catalog

MockForge

#python#mock-api#testing#openapi

Move frontend work and tests forward without waiting for a backend.

Free · MIT-licensed Try the free lite version on GitHub

MockForge is a complete PyForge tool, with the same structure, README and code quality as every tool in the catalog. Free and MIT-licensed. Like it? The All-Access Pass gets you every tool, plus every future one, for $99.

See the All-Access Pass

Key features

  • One resource() call creates a full CRUD resource with in-memory state; seed() adds data
  • mock() serves templates with fresh fake names, emails, UUIDs and numbers
  • Per-route random latency and failure rate to test timeouts and retries

requirements.txt — no third-party packages needed

Why PyForge: Ready-made tools with full source code.

More details

Move frontend work and tests forward without waiting for a backend. MockForge is a mock API server in pure Python, up in a few lines of code. - One resource() call creates a full CRUD resource with in-memory state; seed() adds data - mock() serves templates with fresh fake names, emails, UUIDs and numbers - Per-route random latency and failure rate to test timeouts and retries Runs with: Python 3, zero dependencies. Free and MIT-licensed.

MockForgeAPIs & Testing
Read the technical deep-diveDecoupling Frontend and Backend with MockForge: Dynamic Synthetic API Mocking
main.pypythonExample usage — main.py
from main import MockForge

app = MockForge(port=8080, host="127.0.0.1")
app.resource("users")   # CRUD at /api/v1/users
app.mock("/api/v1/profile", response={"name": "{{name}}", "email": "{{email}}"},
         latency_ms=(100, 400), failure_rate=0.1)
app.serve()

Quick Start

Runs on Python 3.9 or newer with the standard library only. Nothing to pip install.

1 — Run it

python main.py --help

How agents & programs use it: It uses only the Python standard library, so scripts and AI agents can run it as a subprocess without extra installs.

Why developers buy from PyForge

  • Save hours: ready-made, tested tools. Skip writing, debugging and maintaining it yourself.
  • Ready in minutes: one file, drop it in your project and run it.
  • Mostly zero-dependency: no pip install chains, no supply-chain risk.
  • Full source code: readable, auditable, yours to modify.
  • Runs locally and offline: no account, no API key, no data leaves your machine.
  • Pay once, own it: no subscription.
  • Tested before release: every tool is checked before it goes on sale.

All-Access Pass

Get every PyForge tool with the All-Access Pass

49 tools today plus every future release, lifetime commercial license, one payment of $99.

See the All-Access Pass