kgb
JSON →kgb is a Python library that provides utilities for creating function spies in unit tests, offering a powerful alternative to traditional mocking. It intercepts and records calls to functions, tracking arguments and return values, and can modify function behavior at the bytecode level. Unlike some mocking frameworks, kgb can spy on top-level functions in addition to class methods. It supports popular testing frameworks like unittest, pytest, nose, and nose2, and maintains an active release cadence, with recent versions adding support for the latest Python releases.
Traffic · last 30 days ↑80% vs prev 7d
total hits 18
actors 5 distinct systems
last hit 1d ago Bingbot
top countries VN · 🇩🇪 Germany · 🇺🇸 United States · UZ · 🇮🇳 India
Resources
packagepypi.org/project/kgb/ ↗
API endpoints
full doc /v1/registry/kgb
install /v1/registry/kgb/install
compatibility /v1/registry/kgb/compatibility