pyperclip
A cross-platform clipboard module for Python. (Only handles plain text for now.)
Decision gist · record as of 2026-08-14
Yes. Pyperclip is a mature, stable, zero-dependency library with no known vulnerabilities and a permissive license. Install it if you need cross-platform clipboard access; the only gotcha is ensuring Linux systems have xclip/xsel available or Qt installed. For this specific use case, it's the standard choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- On Linux, xclip or xsel command-line tools must be available on the system, or qtpy/PyQT5 modules must be installed; Windows and macOS have native clipboard support built in.
- Installation is straightforward with no runtime dependencies.
- The package is in production/stable status and maintained, though the last release was 322 days ago, suggesting a mature project with infrequent updates rather than active development.
License · maintenance · safety
BSD (permissive) — BSD is a permissive license, so you can use this package freely in commercial and private projects with minimal restrictions beyond retaining the license notice.
last release 2025-09-26 (322 days) · last repo commit 2025-09-26 · 1,844 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 107,879,396 downloads/mo, #324 on PyPI
Alternatives
Verify before relying
pip install pyperclip
import pyperclip
pyperclip.copy('text to clipboard')
text = pyperclip.paste()- Whether the package still works reliably with Python 3.14 (listed as supported but release predates Python 3.14 GA)
- Current status of xsel reliability on Linux (description notes it 'does not always seem to work')
What it is and what it does
Pyperclip is a lightweight, zero-dependency library that wraps platform-specific clipboard commands into a simple Python API. It lets you read from and write to the system clipboard with just two functions: copy() and paste(). The library handles the OS-specific details transparently—on Windows it uses native APIs, on macOS it calls pbcopy/pbpaste, and on Linux it uses xclip or xsel (or falls back to Qt if available).
The package is designed for plaintext only and has been stable since 2013. It's useful whenever you need to integrate clipboard operations into a Python script without worrying about which operating system your code will run on. Installation is a single pip command, and there are no external Python dependencies to manage.
Use it for
- Automate copying generated text (passwords, tokens, formatted data) to the clipboard for manual pasting elsewhere
- Build CLI tools that read clipboard content as input and process it programmatically
- Create desktop automation scripts that synchronize clipboard content between applications
- Write testing utilities that verify clipboard state or simulate user copy/paste workflows
- Implement quick-access utilities that format and copy common snippets to the clipboard
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Pyperclip is a mature, stable, zero-dependency library with no known vulnerabilities and a permissive license. Install it if you need cross-platform clipboard access; the only gotcha is ensuring Linux systems have xclip/xsel available or Qt installed. For this specific use case, it's the standard choice.
Install
pyperclip on PyPI
Before you install
Installation is straightforward with no runtime dependencies. The package is in production/stable status and maintained, though the last release was 322 days ago, suggesting a mature project with infrequent updates rather than active development.
On Linux, xclip or xsel command-line tools must be available on the system, or qtpy/PyQT5 modules must be installed; Windows and macOS have native clipboard support built in.
License in practice
BSD is a permissive license, so you can use this package freely in commercial and private projects with minimal restrictions beyond retaining the license notice.
Quickstart
pip install pyperclip
import pyperclip
pyperclip.copy('text to clipboard')
text = pyperclip.paste()
Verify before relying
- Whether the package still works reliably with Python 3.14 (listed as supported but release predates Python 3.14 GA)
- Current status of xsel reliability on Linux (description notes it 'does not always seem to work')
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 322 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 107,879,396 / month, #324 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: MacOS XEnvironment :: Win32 (MS Windows)Environment :: X11 ApplicationsIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: pyperclip-1.11.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “clipboard copy paste”
- pyperclipPyperclip provides simple cross-platform access to the system…
- clipboardProvides a simple interface to copy text to and paste text from the…
- pyreadline3Provides GNU readline-like keyboard input handling and text editing…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
Provides a simple interface to copy text to and paste text from the system clipboard on Windows, Mac, and Linux.
Provides type annotations for the pyperclip clipboard library, enabling type checkers like mypy and pyright to validate code that uses pyperclip.
Displays mask characters (like asterisks) as the user types a password, providing visual feedback that standard library getpass does not offer.
However, the high install friction (source distribution only) and lack of updates since early 2023 mean you should verify it works on your target Python version…
Provides GNU readline-like line editing and history functionality for Python on Windows, including text selection, clipboard operations, and keyboard shortcuts.
Install only if you are locked to Python 2.7 or 3.4–3.5 on legacy Windows systems with no other options.
PyGetWindow provides functions to query, identify, and control application windows on Windows, macOS, and X11 systems—retrieving window objects by title or screen position, and manipulating their state, size, and position.
Provides GNU readline-like keyboard input handling and text editing for Python on Windows, including text selection, copy/paste, and multi-line code pasting.
However, verify compatibility if you're on a non-Windows platform, as the package is explicitly tested only on Windows 10 despite supporting Python 3.8–3.12.
See also PyAutoGUI · universal-startfile · PyScreeze · PyMsgBox