finds.dev← search

// the find

asweigart/pyperclip

★ 1,839 · Python · BSD-3-Clause · updated Sep 2025

Python module for cross-platform clipboard functions.

Pyperclip is a minimal Python library that gives you `copy()` and `paste()` for the system clipboard across Windows, macOS, and Linux. It's the go-to choice when you need clipboard access in a CLI tool or script without pulling in a full GUI toolkit.

Zero dependencies on Windows and macOS — it shells out to native commands (pbcopy/pbpaste) or uses ctypes. The API is about as simple as it gets: two functions, no configuration. It's been around long enough that most edge cases on mainstream platforms are handled. Al Sweigart's name on it means it's well-known and stable.

Linux support is fragile — it depends on xclip, xsel, or a Qt install being present, which breaks in headless environments and CI with no obvious error message. Plaintext only, so if you need RTF, HTML, or image clipboard data you're out of luck and need to reach for something like `pywin32` or `AppKit` directly. The project has been effectively dormant since 2021 despite open issues, so don't expect bug fixes. At 1800 stars this is a utility, not a platform — there's no plugin system or extension point if your needs grow.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →