skillfed

wiremock

Wiremock Admin API Client

wiremock v2.7.0 589.1K downloads/30d#5,865 on PyPI
Permissive license OSI Approved :: Apache Software License AGING released

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 wiremock

uv

uv add wiremock

poetry

poetry add wiremock

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Other EnvironmentEnvironment :: PluginsEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseLicense :: Other/Proprietary LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: ImplementationTopic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: Software Development :: Testing :: MockingTopic :: Software Development :: Testing :: Unit

Tags

HTTP mocking for testsWireMock Python clientmock REST API servicestest double for web servicesHTTP stub server integrationservice virtualization testingtestcontainers WireMock
http-mockingtest-doublesservice-virtualization

More Python Modules packages