{"id":13560850,"url":"https://github.com/autopilot-rs/autopy","last_synced_at":"2026-04-04T12:23:51.293Z","repository":{"id":42791754,"uuid":"130378144","full_name":"autopilot-rs/autopy","owner":"autopilot-rs","description":" A simple, cross-platform GUI automation module for Python and Rust.","archived":false,"fork":false,"pushed_at":"2025-12-17T22:51:24.000Z","size":709,"stargazers_count":980,"open_issues_count":25,"forks_count":108,"subscribers_count":18,"default_branch":"main","last_synced_at":"2026-01-14T00:21:09.837Z","etag":null,"topics":["automation","cross-platform","gui","input","python","simulation"],"latest_commit_sha":null,"homepage":"https://www.autopy.org/","language":"Rust","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/autopilot-rs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-04-20T15:08:00.000Z","updated_at":"2026-01-10T14:32:07.000Z","dependencies_parsed_at":"2024-01-13T22:22:52.955Z","dependency_job_id":"ce36c532-320d-44b9-ae55-8b26daa48f0f","html_url":"https://github.com/autopilot-rs/autopy","commit_stats":{"total_commits":116,"total_committers":6,"mean_commits":"19.333333333333332","dds":0.09482758620689657,"last_synced_commit":"a98bb7557d3e0a2955c34c7b44e83035416578e7"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/autopilot-rs/autopy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autopilot-rs%2Fautopy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autopilot-rs%2Fautopy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autopilot-rs%2Fautopy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autopilot-rs%2Fautopy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/autopilot-rs","download_url":"https://codeload.github.com/autopilot-rs/autopy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autopilot-rs%2Fautopy/sbom","scorecard":{"id":217384,"data":{"date":"2025-08-11","repo":{"name":"github.com/autopilot-rs/autopy","commit":"264a791e0ecfbde18531977f4ec0dff4beedb981"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.9,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 5/27 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/build.yaml:13","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:102: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yaml:104: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:109: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:120: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yaml:122: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yaml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yaml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:83: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yaml:88: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:94: update your workflow using https://app.stepsecurity.io/secureworkflow/autopilot-rs/autopy/build.yaml/main?enable=pin","Warn: pipCommand not pinned by hash: scripts/mac:7","Warn: pipCommand not pinned by hash: scripts/mac:8","Warn: pipCommand not pinned by hash: scripts/mac:12","Warn: pipCommand not pinned by hash: scripts/upload:7","Info:   0 out of  12 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T01:54:23.156Z","repository_id":42791754,"created_at":"2025-08-17T01:54:23.157Z","updated_at":"2025-08-17T01:54:23.157Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31399808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["automation","cross-platform","gui","input","python","simulation"],"created_at":"2024-08-01T13:00:50.111Z","updated_at":"2026-04-04T12:23:51.273Z","avatar_url":"https://github.com/autopilot-rs.png","language":"Rust","readme":"[![Latest PyPI version](https://img.shields.io/pypi/v/autopy.svg)](https://pypi.python.org/pypi/autopy/)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/autopy.svg)](https://pypi.python.org/pypi/autopy/)\n[![Total downloads](https://pepy.tech/badge/autopy)](https://pepy.tech/project/autopy)\n\n[![Github Build Status](https://github.com/autopilot-rs/autopy/actions/workflows/build.yaml/badge.svg)](https://github.com/autopilot-rs/autopy/actions/workflows/build.yaml)\n[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/2p5xap3tv4qkwsd1?svg=true)](https://ci.appveyor.com/project/msanders/autopy)\n\nAutoPy Introduction and Tutorial\n=================================\n\n## Introduction\n\nAutoPy is a simple, cross-platform GUI automation library for Python. It\nincludes functions for controlling the keyboard and mouse, finding colors and\nbitmaps on-screen, and displaying alerts.\n\nCurrently supported on macOS, Windows, and X11 with the XTest extension.\n\n## Getting Started\n\n### Requirements\n\n* Python 3.8 and onwards (for newer releases).\n* Rust 1.23.0-nightly 2019-02-06 or later (unless using a binary wheel\n  distribution).\n* macOS 10.6 and up.\n* Windows 7 and up.\n* X11 with the XTest extension.\n\n### Installation\n\nFirst, see if a binary wheel is available for your machine by running:\n\n    $ pip install -U autopy\n\nIf that fails, install [rustup](https://rustup.rs) and then run:\n\n    $ rustup default nightly-2019-10-05\n    $ pip install -U setuptools-rust\n    $ pip install -U autopy\n\nAnother option is to build from the latest source on the GitHub repository:\n\n    $ git clone git://github.com/autopilot-rs/autopy-rs.git\n    $ cd autopy\n    $ python -m venv .env \u0026\u0026 source .env/bin/activate\n    $ maturin develop\n\nAdditional possibly outdated instructions for installing from source on Windows\nare available [here](https://github.com/autopilot-rs/autopy/blob/master/scripts/windows-setup.md).\n\n### Hello World\n\nThe following is the source for a \"hello world\" script in autopy. Running this\ncode will cause an alert dialog to appear on every major platform:\n\n```python\nimport autopy\n\n\ndef hello_world():\n    autopy.alert.alert(\"Hello, world\")\nhello_world()\n```\n\n![Cross platform alerts](https://github.com/autopilot-rs/autopy/raw/gh-pages/alerts.png)\n\n## Tutorials\n\n### Controlling the Mouse\n\nAutoPy includes a number of functions for controlling the mouse. For a full\nlist, consult the [API\nReference](https://www.autopy.org/documentation/api-reference/mouse.html). E.g.,\nto immediately \"teleport\" the mouse to the top left corner of the screen:\n\n\t\u003e\u003e\u003e import autopy\n\t\u003e\u003e\u003e autopy.mouse.move(0, 0)\n\nTo move the mouse a bit more realistically, we could use:\n\n\t\u003e\u003e\u003e import autopy\n\t\u003e\u003e\u003e autopy.mouse.smooth_move(0, 0)\n\nEven better, we could write our own function to move the mouse across the screen\nas a sine wave:\n\n```python\nimport autopy\nimport math\nimport time\nimport random\nimport sys\n\nTWO_PI = math.pi * 2.0\n\n\ndef sine_mouse_wave():\n    \"\"\"\n    Moves the mouse in a sine wave from the left edge of\n    the screen to the right.\n    \"\"\"\n    width, height = autopy.screen.size()\n    height /= 2\n    height -= 10  # Stay in the screen bounds.\n\n    for x in range(int(width)):\n        y = int(height * math.sin((TWO_PI * x) / width) + height)\n        autopy.mouse.move(x, y)\n        time.sleep(random.uniform(0.001, 0.003))\n\n\nsine_mouse_wave()\n```\n\n\u003cvideo controls src=\"https://github.com/autopilot-rs/autopy/assets/9993663/379ee2a6-5d3e-4f1e-a0bd-420660351875\" width=\"640\" alt=\"Demonstration video\"\u003e\u003c/video\u003e\n\n### Controlling the Keyboard\n\nThe following will enter the keys from the string \"Hello, world!\" in the\ncurrently focused input at 100 WPM:\n\n```python\nimport autopy\n\n\nautopy.key.type_string(\"Hello, world!\", wpm=100)\n```\n\nAlternatively, individual keys can be entered using the following:\n\n```python\nimport autopy\n\n\nautopy.key.tap(autopy.key.Code.TAB, [autopy.key.Modifier.META])\nautopy.key.tap(\"w\", [autopy.key.Modifier.META])\n```\n\n### Working with Bitmaps\n\nAll of autopy's bitmap routines can be found in the module `autopy.bitmap`. A\nuseful way to explore autopy is to use Python's built-in `help()` function, for\nexample in `help(autopy.bitmap.Bitmap)`. AutoPy's functions are documented with\ndescriptive docstrings, so this should show a nice overview.\n\n\t\u003e\u003e\u003e import autopy\n\t\u003e\u003e\u003e autopy.bitmap.capture_screen()\n\t\u003cBitmap object at 0x12278\u003e\n\nThis takes a screenshot of the main screen, copies it to a bitmap, displays its\nmemory address, and then immediately destroys it. Let's do something more\nuseful, like look at its pixel data:\n\n\t\u003e\u003e\u003e import autopy\n\t\u003e\u003e\u003e autopy.bitmap.capture_screen().get_color(0, 0)\n\t15921906\n\nAutoPy uses a coordinate system with its origin starting at the top-left, so\nthis should return the color of pixel at the top-left corner of the screen. The\nnumber shown looks a bit unrecognizable, but we can format it with Python's\nbuilt-in `hex` function:\n\n\t\u003e\u003e\u003e import autopy\n\t\u003e\u003e\u003e hex(autopy.bitmap.capture_screen().get_color(0, 0))\n\t'0xF2F2F2'\n\nAlternatively, we can use:\n\n\n\t\u003e\u003e\u003e import autopy\n\t\u003e\u003e\u003e autopy.color.hex_to_rgb(autopy.screen.get_color(0, 0))\n\t(242, 242, 242)\n\nwhich converts that hex value to a tuple of `(r, g, b)` values. (Note that\n`autopy.screen.get_color()`, used here, is merely a more convenient and\nefficient version of `autopy.bitmap.capture_screen().get_color()`.)\n\nTo save the screen capture to a file, we can use:\n\n\t\u003e\u003e\u003e import autopy\n\t\u003e\u003e\u003e autopy.bitmap.capture_screen().save('screengrab.png')\n\nThe filetype is either parsed automatically from the filename, or given as an\noptional parameter. Currently only jpeg and png files are supported.\n\n\t\u003e\u003e\u003e import autopy\n\t\u003e\u003e\u003e autopy.bitmap.Bitmap.open('needle.png')\n\t\u003cBitmap object at 0x1001d5378\u003e\n\nAside from analyzing a bitmap's pixel data, the main use for loading a bitmap is\nfinding it on the screen or inside another bitmap. For example, the following\nprints the coordinates of the first image found in a bitmap (scanned from left\nto right, top to bottom):\n\n```python\nimport autopy\n\n\ndef find_image_example():\n    needle = autopy.bitmap.Bitmap.open('needle.png')\n    haystack = autopy.bitmap.Bitmap.open('haystack.png')\n\n    pos = haystack.find_bitmap(needle)\n    if pos:\n        print(\"Found needle at: %s\" % str(pos))\n\nfind_image_example()\n```\n\nIt's also possible to do a bounded search by passing a tuple `((x, y), (width,\nheight))`:\n\n```python\nhaystack.find_bitmap(needle, rect=((10, 10), (100, 100)))\n```\n\n## Projects using AutoPy\n\n- [AutoPyDriverServer](https://github.com/daluu/autopydriverserver), AutoPy\n  through WebDriver or a webdriver-compatible server.\n- [guibot](https://github.com/intra2net/guibot), A tool for GUI automation using\n  a variety of computer vision and desktop control backends.\n- [spynner](https://github.com/kiorky/spynner), Programmatic web browsing\n  module with AJAX support for Python.\n- [SUMO](https://github.com/eclipse/sumo), An open source, highly portable,\n  microscopic and continuous road traffic simulation package designed to handle\n  large road networks.\n\n## API Reference\n\nHope you enjoy using autopy! For a more in depth overview, see the [API\nReference](https://www.autopy.org/documentation/api-reference/).\n\n## Contributing\n\nIf you are interested in this project, please consider contributing. Here are a\nfew ways you can help:\n\n- [Report issues](https://github.com/autopilot-rs/autopy/issues).\n- Fix bugs and [submit pull requests](https://github.com/autopilot-rs/autopy/pulls).\n- Write, clarify, or fix documentation.\n- Suggest or add new features.\n\n## License\n\nThis project is licensed under either the [Apache-2.0](LICENSE-APACHE) or\n[MIT](LICENSE-MIT) license, at your option.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","funding_links":[],"categories":["GUI Automation","Rust"],"sub_categories":["Snippets Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautopilot-rs%2Fautopy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautopilot-rs%2Fautopy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautopilot-rs%2Fautopy/lists"}