{"id":22499,"library":"types-pyperclip","title":"Typeshed stubs for pyperclip","description":"Typing stubs for the pyperclip package, maintained as part of typeshed. Version 1.11.0.20260408 provides type annotations for pyperclip on Python >=3.10. Stubs are released as needed when pyperclip or typeshed changes; no fixed cadence.","status":"active","version":"1.11.0.20260408","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["typing","stubs","pyperclip","typeshed"],"install":[{"cmd":"pip install types-pyperclip","lang":"bash","label":"Install stubs"}],"dependencies":[{"reason":"runtime dependency; stubs are only used when pyperclip is installed","package":"pyperclip","optional":false}],"imports":[{"note":"import does not change with stubs; types-pyperclip provides type info for the existing pyperclip module","symbol":"pyperclip","correct":"import pyperclip"}],"quickstart":{"code":"import pyperclip\n\npyperclip.copy('Hello, world!')\ntext = pyperclip.paste()\nprint(text)  # prints \"Hello, world!\"","lang":"python","description":"Basic usage of pyperclip with type stubs. The stubs are automatically picked up by mypy/pyright when installed."},"warnings":[{"fix":"Install both: pip install pyperclip types-pyperclip","message":"types-pyperclip is a stub-only package. It does NOT replace pyperclip; you must install both pyperclip and types-pyperclip separately.","severity":"gotcha","affected_versions":"all"},{"fix":"Add type: ignore or assertions if needed for platform-specific code.","message":"Stubs may not cover all platform-specific behaviors (e.g., Windows vs macOS vs Linux). The type annotations are generic.","severity":"gotcha","affected_versions":"all"},{"fix":"Pin to an older stubs version (e.g., pip install types-pyperclip==1.10.0.20250212) or upgrade Python to >=3.10.","message":"As of types-pyperclip 1.11.0.20260408, the stubs require Python >=3.10. Older Python versions (3.8, 3.9) are no longer supported.","severity":"breaking","affected_versions":">=1.11.0.20260408"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"pip install pyperclip","cause":"pyperclip not installed, only types-pyperclip.","error":"Module 'pyperclip' has no attribute 'copy'"},{"fix":"pip install pyperclip types-pyperclip and ensure mypy sees the site-packages.","cause":"Missing pyperclip or missing types-pyperclip (or mypy cannot locate stubs).","error":"error: Cannot find implementation or library stub for module named 'pyperclip'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}