wiremock
Wiremock Admin API Client
What it is and what it does
Wiremock is a Python client for the WireMock HTTP mocking framework, enabling developers to stub and mock external HTTP services during testing. It works with WireMock running as a standalone Java server or as a containerized service via testcontainers-python, allowing you to define request-response pairs and verify interactions from within your test code.
The library sits between your test code and a WireMock instance, providing a REST API client interface. It supports most major WireMock features for request matching, response templating, and state management, making it useful for unit tests, integration tests, and local development environments where you need to isolate external service dependencies.
Use it for:
- Mock third-party REST APIs in unit tests to avoid external dependencies and network calls.
- Stub microservices during integration testing to simulate various response scenarios and error conditions.
- Run WireMock in a Docker container via testcontainers-python for isolated, repeatable test environments.
- Verify that your application makes correct HTTP requests to external services without calling them.
- Test error handling and retry logic by configuring WireMock to return specific status codes and delays.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python client library for interacting with WireMock instances to mock HTTP services in tests, supporting both standalone servers and containerized deployments.
Yes, if you need HTTP service mocking in Python tests. Low install friction, permissive license, and production-stable status make it a solid choice. The 382-day release gap warrants checking whether upstream WireMock features you need are supported, but the package remains widely used and carries no known vulnerabilities.
Install
wiremock on PyPI
pip
pip install wiremockuv
uv add wiremockpoetry
poetry add wiremockInstalling wiremock
Before you install
Low install friction with only two runtime dependencies (importlib-resources and requests). Package is aging—last release was 382 days ago—but marked production/stable and supports current Python versions (3.7–3.11).
License in practice
Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions. No notable licensing constraints for typical adoption.
Quickstart
pip install wiremock
from wiremock.client import WireMock
wm = WireMock()
wm.register_stub(request=..., response=...)
Requires a running WireMock server instance (either standalone Java server or via testcontainers-python) to connect to.
Verify before relying
- Scope and completeness of WireMock feature coverage beyond 'most major' features mentioned in description.
- Whether the 382-day release gap indicates active maintenance or dormancy relative to upstream WireMock changes.
- Specific testcontainers-python integration requirements and version compatibility.
Package facts
| License | OSI Approved :: Apache Software License (permissive) |
| Python support | supports the current Python release (<4.0,>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — importlib-resources, requests |
| Maintenance | aging — 382 days since the last release |
| First released | |
| Downloads | 589,112/month — #5,865 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: wiremock-2.7.0-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
httmockIntercepts and mocks HTTP requests made by the…
permissive · top 5,000 on PyPI
pookpook intercepts and mocks HTTP traffic for…
permissive · top 15,000 on PyPI
flexmockflexmock creates mock, stub, spy, and fake…
permissive · top 15,000 on PyPI
aiointerceptIntercepts aiohttp client requests by routing…
permissive · top 15,000 on PyPI
mocketMocket is a socket mocking framework that…
permissive · top 15,000 on PyPI
pytest-mockProvides a pytest fixture that wraps the mock…
permissive · top 1,000 on PyPI
requests-mockIntercepts and mocks HTTP requests made through…
permissive · top 1,000 on PyPI
mockitoMockito is a spying and stubbing framework for…
permissive · top 5,000 on PyPI
responsesMocks HTTP requests made by the requests…
permissive · top 1,000 on PyPI
respxRESPX mocks HTTPX and HTTP Core libraries for…
permissive · top 1,000 on PyPI