$npx skillfedfor your agent

pytest_httpserver

pytest-httpserver is a httpserver for pytest

With conditionsPyPI Python ModulesReleased Feb 20263.9M downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_httpserver-1.1.5-py3-none-any.whl
v1.1.5 · released 2026-02-14 · Python >=3.10 · 1 runtime deps: Werkzeug

Yes, if you need to test HTTP clients. The package is actively maintained, has low install friction, and fills a clear testing gap. The only caveat is the unclear license status—verify the actual license before use in proprietary projects. For open-source work or internal testing, it is a solid choice.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • Low friction install with a single runtime dependency (Werkzeug).
  • Actively maintained with recent commits and steady releases since 2018.

License · maintenance · safety

(unclear) — License status is unclear—no SPDX identifier or raw license text is declared in the package metadata, so you should verify the actual license terms before use in proprietary or restricted contexts.

last release 2026-02-14 (181 days) · last repo commit 2026-08-10 · 253 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,898,973 downloads/mo, #2,457 on PyPI

Verify before relying

pip install pytest-httpserver

import pytest
from pytest_httpserver import HTTPServer

def test_client(httpserver):
    httpserver.expect_request("/foobar").respond_with_json({"foo": "bar"})
    # Your HTTP client code here
    assert requests.get(httpserver.url_for("/foobar")).json() == {"foo": "bar"}
  • Whether the package is licensed under an open-source or proprietary license (license metadata is missing).
  • Whether error responses and edge cases can be simulated (not explicitly stated in the fact sheet).
Same gist for agents: .md · .json

What it is and what it does

pytest-httpserver provides a pytest fixture and standalone context manager that starts a local HTTP server to intercept and respond to client requests during tests. Instead of mocking individual HTTP calls, you define expectations—matching on URI, method, headers, query strings, and request body—and specify what response the server should send back. The server can handle permanent expectations (served repeatedly), one-shot expectations (served once), and ordered expectations (served in strict sequence). Responses can be raw data, JSON, Werkzeug Response objects, or custom functions.

The package is built on Werkzeug for HTTP parsing and request/response handling. It works both as a pytest fixture (automatically started and stopped around each test) and as a standalone context manager for non-pytest code. This approach lets you test HTTP clients in isolation without external network calls, making tests faster and more reliable.

Use it for

  • Test an HTTP client library by mocking server responses without running a real server.
  • Verify that your code sends the correct HTTP method, headers, and body to an API.
  • Test ordered sequences of requests in a single test, ensuring your client makes calls in the right order.
  • Run integration tests in CI/CD pipelines where external HTTP services may be unavailable.
  • Use the standalone context manager in non-pytest code to set up temporary HTTP server expectations.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to test HTTP clients.

The package is actively maintained, has low install friction, and fills a clear testing gap. The only caveat is the unclear license status—verify the actual license before use in proprietary projects. For open-source work or internal testing, it is a solid choice.

Install

pytest-httpserver on PyPI

Before you install

Low friction install with a single runtime dependency (Werkzeug). Actively maintained with recent commits and steady releases since 2018.

Requires Python 3.10 or later.

License in practice

License status is unclear—no SPDX identifier or raw license text is declared in the package metadata, so you should verify the actual license terms before use in proprietary or restricted contexts.

Quickstart

pip install pytest-httpserver

import pytest
from pytest_httpserver import HTTPServer

def test_client(httpserver):
    httpserver.expect_request("/foobar").respond_with_json({"foo": "bar"})
    # Your HTTP client code here
    assert requests.get(httpserver.url_for("/foobar")).json() == {"foo": "bar"}

Verify before relying

  • Whether the package is licensed under an open-source or proprietary license (license metadata is missing).
  • Whether error responses and edge cases can be simulated (not explicitly stated in the fact sheet).

Package facts

LicenseNot declared unclear
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
Werkzeug
MaintenanceActively maintained 181 days since the last release
Last repo commit
First released
Downloads3,898,973 / month, #2,457 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaFramework :: PytestIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python Modules

Evidence: pytest_httpserver-1.1.5-py3-none-any.whl

Tags

Capabilities
mock http server pytestfake http server testinghttp client test fixturelocalhost test serverhttp request response mocking
Topics
http-mockingtest-fixture

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “fake http server testing”

  • pytest_httpserverA pytest fixture and standalone context manager that runs a fake HTTP…
  • fakesnowRuns a fake Snowflake database locally for testing, either by…
  • urllib3-mockMocks urllib3 HTTP requests in tests by intercepting calls and…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also pytest-httpx2 · pytest-localserver · pytest-responses · pytest-httpbin · responses · urllib3-mock · aiointercept · pytest-subprocess · mocket · httmock