pyopenxr
Unofficial Python bindings for the OpenXR SDK to access VR and AR devices
pyopenxr is a Python developer SDK for device tracking and rapid virtual reality prototyping using the headset-agnostic OpenXR API. It provides a clean, Pythonic interface to the OpenXR runtime, enabling cross-platform AR/VR development with minimal boilerplate.
🚀 Installation
pip install pyopenxr
🧪 Quick Start
import xr
# Query the available VR/AR extensions
available = xr.enumerate_instance_extension_properties()
# Replace with whatever extensions are required for your application...
required = [xr.KHR_OPENGL_ENABLE_EXTENSION_NAME]
for prop in required:
assert prop in available
Explore the complete working example
hello_xr.py
for a hands-on introduction.
Pythonic naming conventions
| symbol | Python example | C example |
|---|---|---|
| function | xr.create_instance(...) |
xrCreateInstance(...) |
| constant | xr.MAX_SYSTEM_NAME_SIZE |
XR_MAX_SYSTEM_NAME_SIZE |
| struct name | xr.ExtensionProperties |
XrExtensionProperties |
| type alias | xr.Version |
XrVersion |
| enum type | xr.FormFactor |
xrFormFactor |
| enum value | xr.FormFactor.HEAD_MOUNTED_DISPLAY |
XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY |
| handle | xr.Instance |
XrInstance |
📚 Documentation
Full API reference and guides are available
📦 License
This project is licensed under the Apache License 2.0.
Copyright © 2021 Christopher Bruns.
Metadata
Release files for pyopenxr 1.1.6302
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyopenxr-1.1.6302.tar.gz | 20.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyopenxr-1.1.6302-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 76.2 MB
Release files / pyopenxr-1.1.6302.tar.gz
| Download URL | pyopenxr-1.1.6302.tar.gz |
|---|---|
| Size | 20.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb2ae0d2a60ae45a430385e1a6f6a650d380c0324e460d714c33b47d9dfdcb44
|
|
BLAKE2b-256 checksum How to use checksums |
d98ec4ae45a9a5e7b8738550dbdca4682c6fb3fa603f581b37f04de0f5881193
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.13
|
Release files / pyopenxr-1.1.6302-py3-none-any.whl
| Download URL | pyopenxr-1.1.6302-py3-none-any.whl |
|---|---|
| Size | 55.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e646cea7bbbb4fd22bd42edb4aa3e5fe301c2d42b7981fdb81fb51fec4e0a721
|
|
BLAKE2b-256 checksum How to use checksums |
a4a7d841edc6630ec8e312850c9d3d3c3d157776a1b072a698a458f0c2ad3eae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.13
|