pynput.mouse install code example
Example: how to use pynput mouse in python
from pynput.mouse import Button, Controller
mouse = Controller()
# move the pointer
mouse.position = (10, 20)
# Press and release
mouse.press(Button.left)
mouse.release(Button.left)
# Double click; this is different from pressing and releasing
mouse.click(Button.left, 2)
# Scroll two steps down
mouse.scroll(0, 2)