pyperclip
A cross-platform clipboard module for Python. (Only handles plain text for now.)
Install
pyperclip on PyPI
pip
pip install pyperclipuv
uv add pyperclippoetry
poetry add pyperclipPackage facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 321 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: pyperclip-1.11.0-py3-none-any.whl
Keywords: clipboard, copy, paste, clip, xsel, xclip
About pyperclip
from the package's own PyPI description — quoted content, verbatim
Pyperclip is a cross-platform Python module for copy and paste clipboard functions. It works with Python 2 and 3.
Install on Windows: pip install pyperclip
Install on Linux/macOS: pip3 install pyperclip
Al Sweigart al@inventwithpython.com BSD License
Example Usage
>>> import pyperclip
>>> pyperclip.copy('The text to be copied to the clipboard.')
>>> pyperclip.paste()
'The text to be copied to the clipboard.'
Currently only handles plaintext.
On Windows, no additional modules are needed.
On Mac, this module makes use of the pbcopy and pbpaste commands, which should come with the os.
On Linux, this module makes use of the xclip or xsel commands, which should come with the os. Otherwise run "sudo apt-get install xclip" or "sudo apt-get install xsel" (Note: xsel does not always seem to work.)
Otherwise on Linux, you will need the qtpy or PyQT5 modules installed.
Support
If you find this project helpful and would like to support its development, consider donating to its creator on Patreon.
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Pyperclip provides cross-platform clipboard access for copying and pasting plain text in Python, with native support on Windows and command-line integration on macOS and Linux.
Installation is straightforward with no runtime dependencies. The package is aging (321 days since last release) but remains in production-stable status with an active repository and 1844 stars, suggesting it is mature and well-maintained despite infrequent updates.
BSD is a permissive license, allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
Usage
pip install pyperclip
import pyperclip
pyperclip.copy('text to clipboard')
copied_text = pyperclip.paste()
On Linux, xclip or xsel command-line tools must be installed (e.g., sudo apt-get install xclip); alternatively qtpy or PyQT5 modules can be used. macOS requires pbcopy/pbpaste (included with the OS). Windows requires no additional tools.
Verdict: Pyperclip is a stable, dependency-free clipboard utility suitable for cross-platform Python applications. No known vulnerabilities and permissive licensing make it a low-risk choice, though Linux users should verify system clipboard tools are available before deployment.
Needs verification
- Whether the 321-day gap since last release reflects active maintenance or indicates the package is feature-complete and rarely needs updates
- Compatibility with Python 2 (mentioned in description but classifiers show only Python 3.5+)
Similar packages
copyleft · top 1,000 on PyPI
coloramapermissive · top 100 on PyPI
py-cpuinfopermissive · top 1,000 on PyPI
grpciopermissive · top 100 on PyPI
ninjapermissive · top 1,000 on PyPI
pyspnegopermissive · top 1,000 on PyPI
nbconvertpermissive · top 1,000 on PyPI
grpcio-toolspermissive · top 1,000 on PyPI
boltonspermissive · top 1,000 on PyPI
python-magicpermissive · top 1,000 on PyPI