Client library for macOS accessibility
Project description
pyax
Client library for macOS accessibility
The library provides convenient entry points for retreiving accessible objects, and setting up notification observers.
This library also Pythonifies AXUIElement and AXObserver and provides easy ways to access attributes, query the accessible element's heirarchy.
Installation
$ pip install pyax
Usage
See examples directory for in-depth use.
Here is what a basic interactive session could look like:
>>> import pyax
>>> app = pyax.get_application_by_name('Safari')
>>> print(app)
[AXApplication | Safari]
>>> web_root = app.search_for(lambda e: e["AXRole"] == "AXWebArea")
>>> print(web_root)
[AXWebArea | ]
>>> for child in web_root:
... print(child, child["AXDOMIdentifier"])
[AXGroup | ] content
[AXHeading | Navigation menu]
[AXGroup | ] p-personal
[AXGroup | ] p-namespaces
[AXGroup | ] p-views
[AXGroup | ] p-search
[AXGroup | ] p-logo
[AXGroup | ] p-navigation
[AXGroup | ] p-interaction
[AXGroup | ] p-tb
[AXGroup | ] p-coll-print_export
[AXGroup | ] p-wikibase-otherprojects
[AXGroup | ] p-lang
[AXGroup | ] footer
License
pyax was created by Eitan Isaacson. It is licensed under the terms of the MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyax-0.1.0.tar.gz.
File metadata
- Download URL: pyax-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be7534983e3b2218f4f927f039d01e9c5c80d639d3e665d2f4f6d08e9e3210bb
|
|
| MD5 |
0a178d66b4c1da239b3af291605428f6
|
|
| BLAKE2b-256 |
e51a5f622d912693cb805f5711231fb4004d6ef44b0d19e597b52174a4cdd63f
|
File details
Details for the file pyax-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyax-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
183369c87944c72863204564eb81c6596c4065af064380bc39775b49bf795357
|
|
| MD5 |
a4e2e7e26d0124ad745289a305a2a6d0
|
|
| BLAKE2b-256 |
c2a585934e022ef1b2d5669ebc0ef15e827fa9ff3a1bb359ab9bc83462593fa4
|