# pyopenxr
### Unofficial Python bindings for the [OpenXR SDK](https://github.com/KhronosGroup/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.

[](https://github.com/cmbruns/pyopenxr/actions/workflows/pages/pages-build-deployment)
[](https://cmbruns.github.io/pyopenxr/)


---
## ๐ Installation
```bash
pip install pyopenxr
```
## ๐งช Quick Start
```python
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`](https://github.com/cmbruns/pyopenxr_examples/examples)
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](https://cmbruns.github.io/pyopenxr/)
## ๐ฆ License
This project is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
Copyright ยฉ 2021 Christopher Bruns.
Raw data
{
"_id": null,
"home_page": null,
"name": "pyopenxr",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "OpenXR, VR, AR, bindings, Python, 3D, graphics",
"author": null,
"author_email": "\"Christopher M. Bruns\" <cmbruns@rotatingpenguin.com>",
"download_url": "https://files.pythonhosted.org/packages/09/2a/7da27e11e8b98055b84032528c71931053497e037b574ee5e661083ae651/pyopenxr-1.1.5101.tar.gz",
"platform": null,
"description": "# pyopenxr\r\n### Unofficial Python bindings for the [OpenXR SDK](https://github.com/KhronosGroup/OpenXR-SDK) to access VR and AR devices\r\n\r\n**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.\r\n\r\n\r\n[](https://github.com/cmbruns/pyopenxr/actions/workflows/pages/pages-build-deployment)\r\n[](https://cmbruns.github.io/pyopenxr/)\r\n\r\n\r\n\r\n\r\n---\r\n\r\n## \ud83d\ude80 Installation\r\n\r\n```bash\r\npip install pyopenxr\r\n```\r\n\r\n## \ud83e\uddea Quick Start\r\n```python\r\nimport xr\r\n\r\n# Query the available VR/AR extensions\r\navailable = xr.enumerate_instance_extension_properties()\r\n\r\n# Replace with whatever extensions are required for your application...\r\nrequired = [xr.KHR_OPENGL_ENABLE_EXTENSION_NAME]\r\nfor prop in required:\r\n assert prop in available\r\n```\r\n\r\nExplore the complete working example \r\n[`hello_xr.py`](https://github.com/cmbruns/pyopenxr_examples/examples)\r\nfor a hands-on introduction.\r\n\r\n## Pythonic naming conventions\r\n\r\n| symbol | Python example | C example |\r\n| ----------- | ------------------------------------ | ------------------------------------- |\r\n| function | `xr.create_instance(...)` | `xrCreateInstance(...)` |\r\n| constant | `xr.MAX_SYSTEM_NAME_SIZE` | `XR_MAX_SYSTEM_NAME_SIZE` |\r\n| struct name | `xr.ExtensionProperties` | `XrExtensionProperties` |\r\n| type alias | `xr.Version` | `XrVersion` |\r\n| enum type | `xr.FormFactor` | `xrFormFactor` |\r\n| enum value | `xr.FormFactor.HEAD_MOUNTED_DISPLAY` | `XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY` |\r\n| handle | `xr.Instance` | `XrInstance` |\r\n\r\n## \ud83d\udcda Documentation\r\nFull API reference and guides are [available](https://cmbruns.github.io/pyopenxr/)\r\n\r\n## \ud83d\udce6 License\r\nThis project is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).\r\n\r\nCopyright \u00a9 2021 Christopher Bruns.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Unofficial Python bindings for OpenXR VR/AR device access",
"version": "1.1.5101",
"project_urls": {
"bug_tracker": "https://github.com/cmbruns/pyopenxr/issues",
"homepage": "https://github.com/cmbruns/pyopenxr"
},
"split_keywords": [
"openxr",
" vr",
" ar",
" bindings",
" python",
" 3d",
" graphics"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ab7ac2944240b58fad5dc861ff3f396bcf2a513138caa9a4e40fe27ddf69c092",
"md5": "e9a23ae9afdc6918d72cba6476eafb83",
"sha256": "9312786251dc684716cafac4fe05837d9f26a74e8631a5abe875d0600f989a45"
},
"downloads": -1,
"filename": "pyopenxr-1.1.5101-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e9a23ae9afdc6918d72cba6476eafb83",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 4543290,
"upload_time": "2025-09-13T18:18:06",
"upload_time_iso_8601": "2025-09-13T18:18:06.798224Z",
"url": "https://files.pythonhosted.org/packages/ab/7a/c2944240b58fad5dc861ff3f396bcf2a513138caa9a4e40fe27ddf69c092/pyopenxr-1.1.5101-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "092a7da27e11e8b98055b84032528c71931053497e037b574ee5e661083ae651",
"md5": "2809e1e27e4292263f333e5f00d8a1bf",
"sha256": "67524d6a2c7a419ba9c52abe6fb53c7cecec7fbd9895db1eae3b6de45957432c"
},
"downloads": -1,
"filename": "pyopenxr-1.1.5101.tar.gz",
"has_sig": false,
"md5_digest": "2809e1e27e4292263f333e5f00d8a1bf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 4484618,
"upload_time": "2025-09-13T18:18:12",
"upload_time_iso_8601": "2025-09-13T18:18:12.054657Z",
"url": "https://files.pythonhosted.org/packages/09/2a/7da27e11e8b98055b84032528c71931053497e037b574ee5e661083ae651/pyopenxr-1.1.5101.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-13 18:18:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cmbruns",
"github_project": "pyopenxr",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "glfw",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "pyopengl",
"specs": []
}
],
"tox": true,
"lcname": "pyopenxr"
}