glance-sdk
Structured screen understanding for AI apps. glance.run
Replace expensive screenshot-to-vision-model pipelines with one function call. Glance reads the macOS accessibility tree and gives your AI structured data about every UI element — role, label, value, and exact pixel coordinates.
Install
pip install glance-sdk
Usage
from glance_sdk import screen, capture, find, check_access
# LLM-ready text — drop directly into your prompt
context = screen()
# Full structured data
state = capture()
print(state["app"]) # "VS Code"
print(state["elementCount"]) # 342
print(state["captureTimeMs"]) # 28.5
# Find element by name → exact coordinates
btn = find("Submit")
print(btn["centerX"], btn["centerY"]) # 520, 340
# Check accessibility permission
has_access = check_access()
Why
| Screenshot | Glance | |
|---|---|---|
| Speed | 2-5 seconds | ~0.8 seconds |
| Tokens | ~3,000 (image) | ~500 (text) |
| Cost | ~$0.03 / call | ~$0.001 / call |
| Positions | AI guesses | Exact from OS |
Requirements
- macOS 14.2+
- Accessibility permission (System Settings -> Privacy & Security -> Accessibility)
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
glance_sdk-0.1.0.tar.gz
(56.9 kB
view details)
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 glance_sdk-0.1.0.tar.gz.
File metadata
- Download URL: glance_sdk-0.1.0.tar.gz
- Upload date:
- Size: 56.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb2ab0982cb5d01de0c1dc10921a14e36607c73eed44cd84cb38369d3e2c6fab
|
|
| MD5 |
b6b7ffec087f1e15b3a5b50612101f1c
|
|
| BLAKE2b-256 |
0159d83d7384ab26c811fbcbe1d182ac9f6cd0cedbfaa6eaf04145eed4c645b5
|
File details
Details for the file glance_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: glance_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 55.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed2326532d279451f7b55f85f206036d7794215d439ca516569515b22dde2ab3
|
|
| MD5 |
b76455af253f23c4ceb9430dfefed40c
|
|
| BLAKE2b-256 |
c97c6b88c493f1d7e682a505d7c9d7592b84d8c65fb8636229d05fca0ed81a96
|