{"library":"pyscreenshot","title":"Pyscreenshot","description":"Pyscreenshot is a Python library (version 3.1) designed for taking screenshots across various operating systems. It acts as a pure Python wrapper around existing backend tools. While often considered 'obsolete' in favor of Pillow's native ImageGrab on Linux/macOS, it remains useful for its flexible backend support, Wayland compatibility, and optional subprocess handling. The library's release cadence is irregular, with the latest major update in March 2023.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install pyscreenshot Pillow"],"cli":null},"imports":["import pyscreenshot as ImageGrab"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pyscreenshot as ImageGrab\nimport os\n\n# Grab the entire screen\nim = ImageGrab.grab()\n\n# Save image to a file\nfile_path = \"screenshot.png\"\nim.save(file_path)\nprint(f\"Screenshot saved to {file_path}\")\n\n# Optionally grab a specific region (bbox = (left, top, right, bottom))\n# im_region = ImageGrab.grab(bbox=(10, 10, 510, 510))\n# im_region.save(\"screenshot_region.png\")\n# print(\"Region screenshot saved to screenshot_region.png\")\n\n# To display the image (requires an image viewer configured for .show())\n# im.show()","lang":"python","description":"Captures the entire screen and saves it as a PNG file. You can also specify a bounding box for partial screen captures. Ensure Pillow is installed to save and display images.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}