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.
- Validation-aware. Declare field rules in YAML — imnot rejects malformed requests with realistic 422 errors before returning a mock response.
- Rate-limit aware. Declare a
requests_per_minuteceiling onfetchendpoints (and onpaginatedendpoints using the DRF-stylepage_number_urlpagination) — imnot enforces it with a token bucket and returns realistic429responses with aRetry-Afterheader. - 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 |
Paginated list endpoints (offset/limit, cursor, or page-number) 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
- Run load tests against any HTTP endpoint (standalone or partner-bound)
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 |
| Load Test | docs/load-test.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.
Metadata
Release files for imnot 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| imnot-1.5.0.tar.gz | 3.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| imnot-1.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.8 MB
Release files / imnot-1.5.0.tar.gz
| Download URL | imnot-1.5.0.tar.gz |
|---|---|
| Size | 3.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b670962ccef618a0785523f7071c58ae646c6bd1a2cc55812755e05a0b70a7ee
|
|
BLAKE2b-256 checksum How to use checksums |
c1c6027ae524c4f42ba30f946c7eee5b8e5624b0e95b9d69668f84fd0ce3c916
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency logRelease files / imnot-1.5.0-py3-none-any.whl
| Download URL | imnot-1.5.0-py3-none-any.whl |
|---|---|
| Size | 94.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
122026dca4ab55b9d038bd144ce91aafcf70aa276a20b831ea5926a39b67d851
|
|
BLAKE2b-256 checksum How to use checksums |
581b809c70a4b660afe645d34f59f35e99324abc18a8c89305ebad2c55a2fc77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 29, 2026.
Transparency log