{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/10"},{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/14"}],"enrichment":{"capability":"pook intercepts and mocks HTTP traffic for testing, supporting popular Python HTTP clients with a fluent API, regex matching, JSON/XML support, and pluggable mock engines.","skillfed_tags":["http-mocking","test-doubles","request-interception"],"use_cases":["Mock external API responses in unit tests without making real network calls to third-party services.","Test error handling by returning specific HTTP status codes and error payloads from mock endpoints.","Validate request matching logic by asserting that code sends correct headers, query params, or body.","Test multiple HTTP clients against the same mock definitions in a single test suite.","Define reusable mock expectations with regex patterns and JSON Schema validation for request bodies."],"what_it_does":"pook is a Python HTTP mocking library that intercepts traffic from popular HTTP clients and lets you define mock responses using a fluent, chainable API. It works as a decorator, context manager, or direct function call, and supports matching on any HTTP primitive (URL, method, headers, body, query params) with full regex capability. The library includes first-class JSON and XML support via jsonschema and xmltodict, JSON Schema body matching, and can simulate raised errors or network delays.\n\nYou can use pook in both unit tests and runtime environments, with configurable mock lifetimes (volatile, persistent, or TTL-limited). It ships with a built-in mock engine supporting multiple HTTP clients, but also supports pluggable third-party engines. With only 3 small dependencies (furl, jsonschema, xmltodict) and no compiled requirements, it installs cleanly and works on Python 3.10+ (CPython and PyPy).","worth_installing":"Yes. pook is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It solves a common testing need (HTTP mocking) with a clean API that works across multiple HTTP clients. Install it if you need to mock HTTP traffic in tests and want flexibility in matching and response definition."},"id":"pook","links":{"html":"https://skillfed.io/packages/pook","md":"https://skillfed.io/packages/pook.md","pypi":"https://pypi.org/project/pook/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-03-06","license_spdx":"MIT","license_treatment":"permissive","name":"pook","python_support":"supports_current","summary":"HTTP traffic mocking and expectations made easy"},"popularity":{"monthly_downloads":270323,"position":8237,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.1.6"}
