Skip to main content

A Cross Platform clipboard manager

Project description


A cross platform clipboard API for python.

Current State of the Package

Backends are written but untested. Package needs a better test suite.



Crossclip provides a standard python API for interacting with the system clipboard. As of now, Crossclip supports MacOS, Windows, and GNU/Linux desktop environments using Gtk and Qt environments. More environments can be added due to the modular design.


All systems

  • Pillow (5.4.0)


  • Gtk users: PyGObject
  • Qt users: PySide2


  • pywin32


  • pyobjc


This package is hosted on PyPI. Install via:

$ pip install crossclip


Here is an example program:

# Import the clipboard frontend class and Pillow Image package
from crossclip.clipboard import Clipboard
from PIL import Image

# Create a new clipboard instance
cb = Clipboard()

# Get text from the clipboard
mytext = cb.get_text()

# Get an image from the clipboard
myimg = cb.get_image() # myimg is a PIL.Image class

# Put text onto the clipboard
my_message = 'Hello World'

# Put an image onto the clipboard

# Access the backend instance
backend_text = cb.backend.get_text()

It's as easy as that. The frontend wraps all of the backend specifics and provides a simple, uniform interface.

Implementation Details

This library uses a collection of backends to provide clipboard functionality for a specific system or clipboard. For example, there is a clipboard backend for the Windows system clipboard and the Gtk+ clipboard. Each backend inherits from an abstract base class that provides a set of common abstract methods that each backend must implement.

Each of these backends are used in the frontend class, clipboard.Clipboard. The Clipboard class determines the backend to use based on the system platform determined by the sys.platform value. The Clipboard class carries an instance of the backend and uses its functions to provide clipboard functionality.

With a design like this, the library is extensible. New backends can be added and removed.




This package is licensed under the GPLv3.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for crossclip, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size crossclip-0.2.2-py3-none-any.whl (24.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size crossclip-0.2.2.tar.gz (9.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page