Preparing for system design interviews?  Try bugzed.com →

kgb

JSON →
library 7.3 ·python
verified Jun 28, 2026 install

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.

total hits 13
actors 5 distinct systems
last hit 4d ago ByteDance
GPTBot
4
Script
1
ByteDance
1
Search engines
1
Humans
3

top countries 🇺🇸 United States · 🇬🇧 United Kingdom · BD · 🇩🇪 Germany · OM