X Tutup
Skip to content

PyScreenReader/PyScreenReader

PyScreenReader

PyScreenReader

GitHub Actions Workflow Status GitHub branch check runs PyPI Release Read the Docs (version) GitHub License GitHub Repo stars

PyScreenReader is a library for developers to parse on-screen information using the simplicity of Python.

It's a cross-platform abstraction of native accessibility APIs for Windows, macOS, and Linux, based around representing UI elements in a common tree-like interface in Python.

Key features:

  • Parse UI properties: Such as location, size, text content, focus state, and more...
  • Cross-platform support: Write once, works (mostly) everywhere! Compatible with Windows, macOS, and Linux.
  • Unified UI model: Abstracts diverse native UI controls into a single consistent tree-like data structure.
  • Abstracted System APIs: Avoid delving in to the complexity of native per-platform system APIs to interact with the screen.
  • Lightweight and Pythonic: No need for compilers or special toolchain setup, just use Python.

Full documentation of PyScreenReader can be found HERE.
Also checkout PyScreenReader on PyPI.

Warning

PyScreenReader is not yet released and is still in testing. Stay tuned for its public release on PyPi in the near future.

Table of Content

Quick Start

Install PyScreenReader latest release from pip registries.

pip install PyScreenReader

In your Python script, import PyScreenReader -

# Import the reader itself
from PyScreenReader.screen_reader import ScreenReader
# Import the widgets the reader will return
from PyScreenReader.virtual_widgets import VirtualWidget

# Create a screen reader instance
screen_reader = ScreenReader()
# Read the virtual widget tree by your program's PID
root = screen_reader.from_pid(20880)
# Print the location of the root widget extracted
print(f"Position of Root Widget (X: {root.get_x()}, Y: {root.get_y()})")

# Optional: Get all children of the root as a list of VirtualWidgets to traverse the tree!
children = root.get_children()

This is just a quick start. For more information, please refer to our full documentation.

Contributing

We are glad to hear that you are interested in contributing to PyScreenReader! Please see the contribution guideline for more information.
The guideline includes how to file a GitHub issue, open a GitHub Pull Request, set up local dev environment, etc.

Feedback & Support

Feedback is a gift! We appreciate any kind of feedback/questions/concerns in the following forms:

  • File an issue ticket. Issue board is another place where we track technical questions. Once approved by the maintainers, new issues will be assigned and worked on, and hopefully will be released in the next version of PyScreenReader.
  • Found Security concerns and vulnerabilities? Please refer to our SECURITY page and report them through the GitHub Security Portal.

Licensing

PyScreenReader is licensed under MIT License. By using, distributing, or contributing to this project, you agree the terms and conditions of this license.

PyScreenReader greatly relies on:

Special thanks to:

  • NumPy for inspiration for our release workflow
  • Typer for inspiration for our README file

About

PyScreenReader, parse on-screen information using the simplicity of Python on any platform.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

X Tutup