{"id":16538664,"url":"https://github.com/spyoungtech/pyclip","last_synced_at":"2025-03-16T19:32:01.119Z","repository":{"id":37444545,"uuid":"330682028","full_name":"spyoungtech/pyclip","owner":"spyoungtech","description":"Cross-platform Clipboard module for Python with binary support.","archived":false,"fork":false,"pushed_at":"2023-04-21T17:08:52.000Z","size":108,"stargazers_count":43,"open_issues_count":7,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-12T18:46:14.791Z","etag":null,"topics":["clipboard","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pyclip/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spyoungtech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-18T13:54:41.000Z","updated_at":"2024-09-25T20:04:11.000Z","dependencies_parsed_at":"2024-06-18T22:52:35.193Z","dependency_job_id":"9b4a2efb-7135-40ef-adb6-73ecbebc8e96","html_url":"https://github.com/spyoungtech/pyclip","commit_stats":{"total_commits":90,"total_committers":3,"mean_commits":30.0,"dds":0.0444444444444444,"last_synced_commit":"9ec0057f71a4c07bef78d4bf8cdd579e28a4e3f5"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spyoungtech%2Fpyclip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spyoungtech%2Fpyclip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spyoungtech%2Fpyclip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spyoungtech%2Fpyclip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spyoungtech","download_url":"https://codeload.github.com/spyoungtech/pyclip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221667359,"owners_count":16860607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clipboard","python"],"created_at":"2024-10-11T18:46:18.201Z","updated_at":"2024-10-27T11:10:11.791Z","avatar_url":"https://github.com/spyoungtech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyClip\n\nCross-platform clipboard utilities supporting both binary and text data.\n\n[![Docs](https://readthedocs.org/projects/pyclip/badge/?version=latest)](https://pyclip.readthedocs.io/en/latest/?badge=latest)\n![Build](https://img.shields.io/github/checks-status/spyoungtech/pyclip/main?label=build) \n![Coverage](https://img.shields.io/codecov/c/gh/spyoungtech/pyclip/main) \n![PyPI Version](https://img.shields.io/pypi/v/pyclip?color=blue)\n![Python Versions](https://img.shields.io/pypi/pyversions/pyclip) \n[![Download Stats](https://pepy.tech/badge/pyclip)](https://pepy.tech/project/pyclip)\n\n\nSome key features include:\n\n- A cross-platform API (supports MacOS, Windows, Linux)\n- Can handle arbitrary binary data\n- On Windows, some additional [clipboard formats](https://docs.microsoft.com/en-us/windows/win32/dataxchg/standard-clipboard-formats) \nare supported\n\n## Installation\n\nRequires python 3.7+\n\n```bash\npip install pyclip\n```\n\n## Usage\n\npyclip can be used in Python code\n```python\nimport pyclip\n\npyclip.copy(\"hello clipboard\") # copy data to the clipboard\ncb_data = pyclip.paste() # retrieve clipboard contents \nprint(cb_data)  # b'hello clipboard'\ncb_text = pyclip.paste(text=True)  # paste as text\nprint(cb_text)  # 'hello clipboard'\n\npyclip.clear() # clears the clipboard contents\nassert not pyclip.paste()\n```\n\nOr a CLI\n\n```bash\n# paste clipboard contents to stdout\npython -m pyclip paste\n\n# load contents to the clipboard from stdin\npython -m pyclip copy \u003c myfile.text\n# same as above, but pipe from another command\nsome-program | python -m pyclip copy\n```\n\nInstalling via pip also provides the console script `pyclip`:\n\n```bash\npyclip copy \u003c my_file.txt\n```\n\nThis library implements functionality for several platforms and clipboard utilities. \n\n- [x] MacOS\n- [x] Windows\n- [x] Linux on x11 (with `xclip`)\n- [x] Linux on wayland (with `wl-clipboard`)\n\nIf there is a platform or utility not currently listed, please request it by creating an issue.\n\n## Platform specific notes/issues\n\n### Windows\n\n- On Windows, the `pywin32` package is installed as a requirement.\n- On Windows, additional clipboard formats are supported, including copying from a file \n(like if you right-click copy from File Explorer)\n\n### MacOS\n\nMacOS has support for multiple backends. By default, the `pasteboard` package is used.\n\n`pbcopy`/`pbpaste` can also be used as a backend, but does not support arbitrary binary data, which may lead to \ndata being lost on copy/paste. This backend may be removed in a future release.\n\n### Linux\n\nLinux on X11 requires `xclip` to work. Install with your package manager, e.g. `sudo apt install xclip`\nLinux on Wayland requires `wl-clipboard` to work. Install with your package manager, e.g. `sudo apt install wl-clipboard`\n\n# Acknowledgements\n\nBig thanks to [Howard Mao](https://github.com/zhemao) for donating the PyClip project name on PyPI to \nthis project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspyoungtech%2Fpyclip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspyoungtech%2Fpyclip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspyoungtech%2Fpyclip/lists"}