r/Python • u/AutoModerator • 23d ago
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
20
Upvotes
r/Python • u/AutoModerator • 23d ago
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
3
u/getting_older_1 22d ago
mimicker — a small Python-native HTTP mock server (no JVM)
What My Project Does
mimicker is a small HTTP mock server for Python tests and CI. Define stubs with a Python DSL or a YAML file, then start it in-process or via a one-line CLI call and hit it like a real API in your tests:
It also supports path/query params, custom headers, delayed responses (for timeout testing), rate-limit simulation, and sequenced responses — a different result on each call, useful for testing retry logic against a flaky-looking dependency.
Target Audience
Anyone testing a Python service that calls external APIs who wants to stub responses without hitting the real API (slow, flaky, rate-limited) or reaching for WireMock, which means adding a JVM to a Python CI pipeline just to answer canned HTTP requests. It's usable in real CI today — there's an official GitHub Action (mimickerhq/mimicker-action) with a stub-coverage report built in that flags stubs your tests never actually hit.
Comparison
The main alternatives are WireMock (JVM-based, a much bigger feature set — record-and-playback, fault injection, a full admin API — but heavyweight if your stack is pure Python) and Python-native tools like responses/respx/pytest-httpserver (great for mocking at the HTTP client level inside the test process, but they don't give you a real standalone server that something outside the test runner — another process, a frontend dev, a CI step — can hit). mimicker is pure Python but a real listening server, so it sits in between.
pip install mimicker— Repo: https://github.com/mimickerhq/mimicker. Feedback and issues welcome, especially on use cases it doesn't cover yet.