A stateful API mock server for integration testing
Project description
imnot
YAML in. Mock server out. Define external APIs in a single file, run imnot start, and get a fully functional local mock server — stateful flows, session isolation, and an Admin UI included. No code required.
Why imnot?
- Zero code. One YAML file per external API. No JVM, no framework, no boilerplate.
- Stateful, not just stubbed. OAuth, polling, callbacks, paginated lists, and per-test session isolation — all modeled in YAML.
- Ships with your tests. Partner definitions are version-controlled alongside the integration they test and run anywhere Docker runs.
Quick start
Requires Python 3.11+.
pipx install imnot
imnot init
imnot start
pipxinstalls CLI tools into isolated environments. Alternatively:pip install imnotinside an existing virtual environment.
imnot init creates a partners/ directory with two working example partners (staylink and bookingco) that cover all six patterns. Edit or replace them whenever you're ready.
Patterns
| Pattern | What it mocks |
|---|---|
oauth |
Client-credentials token endpoint — returns a standard JWT |
static |
Any fixed-response endpoint — health checks, custom auth, lookup tables |
fetch |
Synchronous GET that returns an uploaded payload |
polling |
N-step async flow: submit → status check(s) → fetch result |
callback |
Webhook simulation — imnot fires the outbound call after receiving a submit |
paginated |
Offset/limit list endpoints sliced from an uploaded array at request time |
All fetch, polling, and paginated endpoints support X-Imnot-Session for per-test isolation — parallel test runs stay independent.
→ Full pattern reference with YAML examples
Admin UI
imnot ships an embedded Admin UI at GET /imnot/admin/ui. No setup required — it's enabled by default and auth-gated by the same Bearer token as the rest of the admin API.
From the browser you can:
- Browse loaded partners and their datapoints
- Upload and inspect payloads (global or session-scoped)
- Run end-to-end endpoint tests — including full polling flows
- Manage active sessions
- Hot-reload YAML without restarting the server
AI-ready
Don't want to write the YAML yourself? Paste one of these into Claude, ChatGPT, or your AI assistant:
From a description:
I use imnot to mock external APIs for integration testing.
Generate a partner.yaml file in imnot format for [service name].
Schema reference: https://github.com/edu2105/imnot/blob/main/partners/README.md
Endpoints to mock: [describe them]
Output only the YAML — no code, no explanation.
From an OpenAPI spec:
I use imnot to mock external APIs for integration testing.
Convert this OpenAPI spec into a partner.yaml file in imnot format.
Schema: https://github.com/edu2105/imnot/blob/main/partners/README.md
Output only the YAML — no code, no explanation.
[paste your spec here]
Learn more
| Topic | Doc |
|---|---|
| Pattern reference | docs/patterns.md |
| Admin API reference | docs/admin-api.md |
| CLI & configuration | docs/cli.md |
| Docker & deployment | docs/deployment.md |
| Partner YAML schema | partners/README.md |
| Contributing | CONTRIBUTING.md |
Limitations
- Callback retries — no built-in retry logic; use the retrigger endpoint to re-fire.
- JSON only — response bodies are always JSON, no XML support.
- Single-node — SQLite session store is not shared across instances.
- Admin UI — desktop layout only; no mobile breakpoints.
- No native TLS — use a reverse proxy (Nginx, Caddy) to terminate HTTPS.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file imnot-1.2.0.tar.gz.
File metadata
- Download URL: imnot-1.2.0.tar.gz
- Upload date:
- Size: 3.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79416129b859c97478863cdb392377981e7dd4de041598f680683057b893c350
|
|
| MD5 |
d651bb15e5d04363cce5be0b865afe1a
|
|
| BLAKE2b-256 |
611f9280726287e93bd7affa0ab465faf64c195727bb6d0246b3ba600c571533
|
Provenance
The following attestation bundles were made for imnot-1.2.0.tar.gz:
Publisher:
release.yml on edu2105/imnot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
imnot-1.2.0.tar.gz -
Subject digest:
79416129b859c97478863cdb392377981e7dd4de041598f680683057b893c350 - Sigstore transparency entry: 1498867599
- Sigstore integration time:
-
Permalink:
edu2105/imnot@896ece151d885ca82f2e6acc97502246c72a877a -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/edu2105
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@896ece151d885ca82f2e6acc97502246c72a877a -
Trigger Event:
push
-
Statement type:
File details
Details for the file imnot-1.2.0-py3-none-any.whl.
File metadata
- Download URL: imnot-1.2.0-py3-none-any.whl
- Upload date:
- Size: 72.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9fa87d93647741989b1831343668baef091827ddf02778b7cb8e291575bc2b7
|
|
| MD5 |
4d0b126a5a090f5e9040cfec42f60ab5
|
|
| BLAKE2b-256 |
3c6fea3f5a2e172a0807cccbfde2b8df1d7ff306126e7ee7c31377330806d8c4
|
Provenance
The following attestation bundles were made for imnot-1.2.0-py3-none-any.whl:
Publisher:
release.yml on edu2105/imnot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
imnot-1.2.0-py3-none-any.whl -
Subject digest:
c9fa87d93647741989b1831343668baef091827ddf02778b7cb8e291575bc2b7 - Sigstore transparency entry: 1498868158
- Sigstore integration time:
-
Permalink:
edu2105/imnot@896ece151d885ca82f2e6acc97502246c72a877a -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/edu2105
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@896ece151d885ca82f2e6acc97502246c72a877a -
Trigger Event:
push
-
Statement type: