Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
A cross platform clipboard API for python.
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.
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'
cb.set_text(my_message)
# Put an image onto the clipboard
cb.set_image(my_pil_image_instance)
# 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.
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.
See CONTRIBUTING.md
This package is licensed under the GPLv3.
FAQs
A Cross Platform clipboard manager
We found that crossclip demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.