In order to get yanky fully functional either one of the following software needs to be installed in your system:
In Debian based systems they can be installed via the package manager.
$ sudo pip install yanky
Package available for Python 3 only.
Usage:
from yanky import copy, paste
#Copy text to OS clipboard
copy('Text to be copied to clipboard')
#Paste from OS clipboard
text_from_cb = paste()