{"id":27426,"library":"stubs","title":"stubs","description":"Tools for setting up stubs and mocks in Python tests. Version 1.0.0, currently at initial release with no defined release cadence.","status":"active","version":"1.0.0","language":"python","source_language":"en","source_url":"http://github.com/zestyping/stubs","tags":["testing","mocks","stubs"],"install":[{"cmd":"pip install stubs","lang":"bash","label":"Latest stable version"}],"dependencies":[],"imports":[{"note":"Correct import for the main Stub class.","symbol":"Stub","correct":"from stubs import Stub"}],"quickstart":{"code":"from stubs import Stub\nstub = Stub()\nstub.return_value('func', 42)\nresult = stub.func()\nprint(result)  # 42","lang":"python","description":"Create a stub and set a return value for a method."},"warnings":[{"fix":"Use 'from stubs import Stub' instead of 'import stubs'.","message":"No known breaking changes as library is at version 1.0.0. However, the API is minimal; ensure you use the correct import path.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from stubs import Stub'.","cause":"Improper import; using 'import stubs' then trying to access 'stubs.Stub'.","error":"AttributeError: module 'stubs' has no attribute 'Stub'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}