qyro-engine 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qyro_engine-0.1.0/LICENSE +21 -0
- qyro_engine-0.1.0/NOTICE +159 -0
- qyro_engine-0.1.0/PKG-INFO +351 -0
- qyro_engine-0.1.0/README.md +312 -0
- qyro_engine-0.1.0/pyproject.toml +45 -0
- qyro_engine-0.1.0/qyro/__init__.py +69 -0
- qyro_engine-0.1.0/qyro/adapters/__init__.py +20 -0
- qyro_engine-0.1.0/qyro/adapters/environment/__init__.py +3 -0
- qyro_engine-0.1.0/qyro/adapters/environment/system_environment.py +57 -0
- qyro_engine-0.1.0/qyro/adapters/platform/__init__.py +3 -0
- qyro_engine-0.1.0/qyro/adapters/platform/detector.py +73 -0
- qyro_engine-0.1.0/qyro/adapters/resources/__init__.py +3 -0
- qyro_engine-0.1.0/qyro/adapters/resources/filesystem_resources.py +217 -0
- qyro_engine-0.1.0/qyro/adapters/resources/protected_bundle.py +227 -0
- qyro_engine-0.1.0/qyro/adapters/resources/runtime_secret.py +48 -0
- qyro_engine-0.1.0/qyro/adapters/resources/secrets_crypto.py +133 -0
- qyro_engine-0.1.0/qyro/adapters/settings/__init__.py +3 -0
- qyro_engine-0.1.0/qyro/adapters/settings/json_settings.py +198 -0
- qyro_engine-0.1.0/qyro/adapters/telemetry/__init__.py +4 -0
- qyro_engine-0.1.0/qyro/adapters/telemetry/console_hook.py +38 -0
- qyro_engine-0.1.0/qyro/adapters/telemetry/sentry_hook.py +51 -0
- qyro_engine-0.1.0/qyro/application/__init__.py +26 -0
- qyro_engine-0.1.0/qyro/application/ports/__init__.py +16 -0
- qyro_engine-0.1.0/qyro/application/ports/environment.py +37 -0
- qyro_engine-0.1.0/qyro/application/ports/resources.py +23 -0
- qyro_engine-0.1.0/qyro/application/ports/settings.py +22 -0
- qyro_engine-0.1.0/qyro/application/ports/telemetry.py +27 -0
- qyro_engine-0.1.0/qyro/application/use_cases/__init__.py +13 -0
- qyro_engine-0.1.0/qyro/application/use_cases/initialize_engine.py +41 -0
- qyro_engine-0.1.0/qyro/application/use_cases/load_settings.py +25 -0
- qyro_engine-0.1.0/qyro/application/use_cases/resolve_resource.py +30 -0
- qyro_engine-0.1.0/qyro/client/__init__.py +3 -0
- qyro_engine-0.1.0/qyro/client/development_changes.py +135 -0
- qyro_engine-0.1.0/qyro/client/development_pydux.py +64 -0
- qyro_engine-0.1.0/qyro/client/development_state.py +96 -0
- qyro_engine-0.1.0/qyro/client/velto_context.py +520 -0
- qyro_engine-0.1.0/qyro/container.py +66 -0
- qyro_engine-0.1.0/qyro/domain/__init__.py +33 -0
- qyro_engine-0.1.0/qyro/domain/entities.py +83 -0
- qyro_engine-0.1.0/qyro/domain/errors.py +49 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Neuri
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
qyro_engine-0.1.0/NOTICE
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Qyro CLI
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 - 2026 Neuri
|
|
4
|
+
|
|
5
|
+
Qyro CLI depends on several open source libraries and external tools. This file
|
|
6
|
+
describes the open source software used by, supported by, or integrated with
|
|
7
|
+
Qyro CLI and the applicable license terms.
|
|
8
|
+
|
|
9
|
+
Some third-party software may be used by applications generated by Qyro CLI,
|
|
10
|
+
while other software is invoked externally by Qyro CLI when performing specific
|
|
11
|
+
build or distribution operations. Third-party components are not necessarily
|
|
12
|
+
distributed with Qyro CLI and remain subject to their respective licenses.
|
|
13
|
+
|
|
14
|
+
For the complete license terms of a dependency, refer to the license provided
|
|
15
|
+
by the respective project.
|
|
16
|
+
|
|
17
|
+
# Qyro
|
|
18
|
+
|
|
19
|
+
URL: https://github.com/Neuri-AI/qyro
|
|
20
|
+
|
|
21
|
+
The Qyro CLI generates and orchestrates applications based on Qyro.
|
|
22
|
+
|
|
23
|
+
Qyro is distributed under its own applicable license terms.
|
|
24
|
+
See the Qyro repository for its license and third-party notices.
|
|
25
|
+
|
|
26
|
+
# PyInstaller
|
|
27
|
+
|
|
28
|
+
URL: https://www.pyinstaller.org
|
|
29
|
+
|
|
30
|
+
Qyro CLI invokes PyInstaller to freeze Python applications into standalone
|
|
31
|
+
application artifacts.
|
|
32
|
+
|
|
33
|
+
PyInstaller is distributed under the GNU General Public License, version 2
|
|
34
|
+
or later, with an exception that permits the distribution of applications
|
|
35
|
+
generated by PyInstaller under terms selected by the application author.
|
|
36
|
+
|
|
37
|
+
Qyro CLI does not link to PyInstaller as a library; it invokes PyInstaller
|
|
38
|
+
as a build tool.
|
|
39
|
+
|
|
40
|
+
# PySide6
|
|
41
|
+
|
|
42
|
+
URL: https://doc.qt.io/qtforpython/
|
|
43
|
+
|
|
44
|
+
PySide6 may be used by applications generated by Qyro CLI.
|
|
45
|
+
|
|
46
|
+
PySide6 is distributed under the GNU Lesser General Public License, version 3,
|
|
47
|
+
or other applicable Qt licensing terms.
|
|
48
|
+
|
|
49
|
+
See the PySide6 and Qt licensing documentation for complete terms.
|
|
50
|
+
|
|
51
|
+
# PyQt6
|
|
52
|
+
|
|
53
|
+
URL: https://www.riverbankcomputing.com/software/pyqt/
|
|
54
|
+
|
|
55
|
+
PyQt6 may be used by applications generated by Qyro CLI.
|
|
56
|
+
|
|
57
|
+
PyQt6 is available under the GNU General Public License, version 3, or a
|
|
58
|
+
commercial license from Riverbank Computing, subject to the applicable
|
|
59
|
+
licensing terms.
|
|
60
|
+
|
|
61
|
+
# PyQt5
|
|
62
|
+
|
|
63
|
+
URL: https://www.riverbankcomputing.com/software/pyqt/
|
|
64
|
+
|
|
65
|
+
PyQt5 may be used by applications generated by Qyro CLI.
|
|
66
|
+
|
|
67
|
+
PyQt5 is available under the GNU General Public License, version 3, or a
|
|
68
|
+
commercial license from Riverbank Computing, subject to the applicable
|
|
69
|
+
licensing terms.
|
|
70
|
+
|
|
71
|
+
# PySide2
|
|
72
|
+
|
|
73
|
+
URL: https://wiki.qt.io/Qt_for_Python
|
|
74
|
+
|
|
75
|
+
PySide2 may be used by applications generated by Qyro CLI.
|
|
76
|
+
|
|
77
|
+
PySide2 is distributed under the GNU Lesser General Public License, version 3,
|
|
78
|
+
or other applicable Qt licensing terms.
|
|
79
|
+
|
|
80
|
+
See the PySide2 and Qt licensing documentation for complete terms.
|
|
81
|
+
|
|
82
|
+
# Kivy
|
|
83
|
+
|
|
84
|
+
URL: https://kivy.org
|
|
85
|
+
|
|
86
|
+
Kivy may be used by applications generated by Qyro CLI.
|
|
87
|
+
|
|
88
|
+
Kivy is distributed under the MIT License.
|
|
89
|
+
|
|
90
|
+
# Tkinter
|
|
91
|
+
|
|
92
|
+
URL: https://docs.python.org/3/library/tkinter.html
|
|
93
|
+
|
|
94
|
+
Tkinter is part of the Python standard library and may be used by applications
|
|
95
|
+
generated by Qyro CLI.
|
|
96
|
+
|
|
97
|
+
Tkinter is distributed as part of Python and is subject to the applicable
|
|
98
|
+
Python license terms.
|
|
99
|
+
|
|
100
|
+
# External Distribution Tools
|
|
101
|
+
|
|
102
|
+
Qyro CLI may require external tools for specific distribution targets.
|
|
103
|
+
These tools are not bundled with or redistributed by Qyro CLI.
|
|
104
|
+
|
|
105
|
+
When an operation requires one of these tools and it is not installed,
|
|
106
|
+
Qyro CLI reports the missing requirement and instructs the user to install
|
|
107
|
+
the corresponding tool.
|
|
108
|
+
|
|
109
|
+
## create-dmg
|
|
110
|
+
|
|
111
|
+
URL: https://github.com/create-dmg/create-dmg
|
|
112
|
+
|
|
113
|
+
Qyro CLI may invoke create-dmg to create customized macOS disk images.
|
|
114
|
+
|
|
115
|
+
create-dmg is distributed under the MIT License.
|
|
116
|
+
|
|
117
|
+
## fpm
|
|
118
|
+
|
|
119
|
+
URL: https://github.com/jordansissel/fpm
|
|
120
|
+
|
|
121
|
+
Qyro CLI may invoke fpm to create Linux packages such as DEB, RPM,
|
|
122
|
+
and Arch packages.
|
|
123
|
+
|
|
124
|
+
fpm is distributed under the MIT License.
|
|
125
|
+
|
|
126
|
+
## NSIS
|
|
127
|
+
|
|
128
|
+
URL: https://nsis.sourceforge.io
|
|
129
|
+
|
|
130
|
+
Qyro CLI may invoke NSIS to create Windows installers.
|
|
131
|
+
|
|
132
|
+
NSIS is distributed under its own open source license terms.
|
|
133
|
+
|
|
134
|
+
The applicable copyright and license notices for these external tools are
|
|
135
|
+
provided by their respective projects.
|
|
136
|
+
|
|
137
|
+
# Open Source Licensing
|
|
138
|
+
|
|
139
|
+
Qyro CLI is designed to work with multiple independently licensed open source
|
|
140
|
+
frameworks, libraries, and packaging tools.
|
|
141
|
+
|
|
142
|
+
The licensing terms of a generated application depend on the frameworks,
|
|
143
|
+
libraries, resources, and external tools included in that application.
|
|
144
|
+
|
|
145
|
+
Users are responsible for reviewing and complying with the licenses applicable
|
|
146
|
+
to the dependencies and components they distribute.
|
|
147
|
+
|
|
148
|
+
Where a dependency requires attribution, license notices, or source code
|
|
149
|
+
availability, those requirements must be satisfied in accordance with the
|
|
150
|
+
dependency's license.
|
|
151
|
+
|
|
152
|
+
# Third-Party Notices
|
|
153
|
+
|
|
154
|
+
This NOTICE file is provided for informational and attribution purposes.
|
|
155
|
+
It does not replace, modify, or supersede the license terms of any third-party
|
|
156
|
+
software.
|
|
157
|
+
|
|
158
|
+
For components distributed separately from Qyro CLI, consult the corresponding
|
|
159
|
+
upstream project for the authoritative license text and copyright notices.
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: qyro-engine
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Qyro Engine is the runtime engine for the Velto ecosystem, providing the foundation for building and running Python applications across desktop and mobile platforms.
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
License-File: NOTICE
|
|
8
|
+
Author: runesc
|
|
9
|
+
Author-email: luisalfredoreyes98@gmail.com
|
|
10
|
+
Requires-Python: >=3.10,<3.14.20
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Provides-Extra: all
|
|
18
|
+
Provides-Extra: kivy
|
|
19
|
+
Provides-Extra: pyqt5
|
|
20
|
+
Provides-Extra: pyqt6
|
|
21
|
+
Provides-Extra: pyside2
|
|
22
|
+
Provides-Extra: pyside6
|
|
23
|
+
Provides-Extra: sentry
|
|
24
|
+
Requires-Dist: PyQt5 (>=5.15) ; (python_version < "3.14") and (extra == "all")
|
|
25
|
+
Requires-Dist: PyQt5 (>=5.15) ; (python_version < "3.14") and (extra == "pyqt5")
|
|
26
|
+
Requires-Dist: PyQt6 (>=6.8) ; (python_version < "3.14") and (extra == "all")
|
|
27
|
+
Requires-Dist: PyQt6 (>=6.8) ; (python_version < "3.14") and (extra == "pyqt6")
|
|
28
|
+
Requires-Dist: PySide2 (>=5.15,<6) ; (python_version < "3.11") and (extra == "all")
|
|
29
|
+
Requires-Dist: PySide2 (>=5.15,<6) ; (python_version < "3.11") and (extra == "pyside2")
|
|
30
|
+
Requires-Dist: PySide6 (>=6.8) ; (python_version < "3.14") and (extra == "all")
|
|
31
|
+
Requires-Dist: PySide6 (>=6.8) ; (python_version < "3.14") and (extra == "pyside6")
|
|
32
|
+
Requires-Dist: cryptography (>=50.0.2,<=51.0.0)
|
|
33
|
+
Requires-Dist: kivy (>=2.3) ; extra == "all"
|
|
34
|
+
Requires-Dist: kivy (>=2.3) ; extra == "kivy"
|
|
35
|
+
Requires-Dist: sentry-sdk (>=1.30.0) ; extra == "all"
|
|
36
|
+
Requires-Dist: sentry-sdk (>=1.30.0) ; extra == "sentry"
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
<p align="center">
|
|
40
|
+
<img src="https://ik.imagekit.io/kummiktgaiq/ppg/Qyro-logo.svg?updatedAt=1755215983279" alt="Qyro Logo" width="50%">
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
# Qyro Runtime
|
|
44
|
+
|
|
45
|
+
> **Runtime engine for Python applications, providing a cross-platform foundation for desktop and mobile environments.**
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
[](https://python.org)
|
|
49
|
+

|
|
50
|
+

|
|
51
|
+

|
|
52
|
+

|
|
53
|
+

|
|
54
|
+
[](LICENSE)
|
|
55
|
+
[](https://buymeacoffee.com/neuri)
|
|
56
|
+
> [!IMPORTANT]
|
|
57
|
+
> **Qyro Engine v0.1.0 is a beta release.** Runtime APIs and integrations may change. Development currently focuses on desktop applications; mobile support is not yet considered stable.
|
|
58
|
+
|
|
59
|
+
# Overview
|
|
60
|
+
|
|
61
|
+
Qyro Engine provides the infrastructure to initialize, configure, and run cross-platform Python applications. It centralizes the application lifecycle, resource resolution, and runtime services.
|
|
62
|
+
|
|
63
|
+
- **Lifecycle:** initialization, mounting, execution, and resource cleanup through `VeltoContext`.
|
|
64
|
+
- **Configuration:** merging general, operating-system-specific, and development-only settings.
|
|
65
|
+
- **Resource management:** locating files and assets in both development environments and packaged applications.
|
|
66
|
+
- **Protected resources:** reading and verifying compatible resource bundles and encrypted secrets.
|
|
67
|
+
- **Development:** coordinating code updates and controlled restarts when needed.
|
|
68
|
+
- **Application state:** recovering compatible state during development refreshes.
|
|
69
|
+
- **Environment information:** platform detection, execution mode, and metadata.
|
|
70
|
+
- **Optional telemetry:** Sentry integration.
|
|
71
|
+
|
|
72
|
+
## Installation
|
|
73
|
+
|
|
74
|
+
**Requirements:** Python `>=3.10,<3.14.20`, plus the dependencies of the selected UI framework, where applicable. Availability varies by operating system and Python version.
|
|
75
|
+
|
|
76
|
+
```shell
|
|
77
|
+
python -m pip install qyro-engine==0.1.0
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Or with Poetry:
|
|
81
|
+
|
|
82
|
+
```shell
|
|
83
|
+
poetry add qyro-engine@0.1.0
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Optional framework dependencies are available through package extras:
|
|
87
|
+
|
|
88
|
+
```shell
|
|
89
|
+
python -m pip install "qyro-engine[pyside6]==0.1.0"
|
|
90
|
+
python -m pip install "qyro-engine[pyqt6]==0.1.0"
|
|
91
|
+
python -m pip install "qyro-engine[pyside2]==0.1.0"
|
|
92
|
+
python -m pip install "qyro-engine[pyqt5]==0.1.0"
|
|
93
|
+
python -m pip install "qyro-engine[kivy]==0.1.0"
|
|
94
|
+
python -m pip install "qyro-engine[sentry]==0.1.0"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Note:** Extras install optional dependencies for their respective frameworks, not a complete UI stack. Tkinter depends on your Python/Tk installation. Package availability varies by operating system and Python version.
|
|
98
|
+
|
|
99
|
+
To develop from this repository:
|
|
100
|
+
|
|
101
|
+
```shell
|
|
102
|
+
git clone https://github.com/Neuri-AI/qyro.git
|
|
103
|
+
cd qyro
|
|
104
|
+
python -m pip install -e ".[sentry]" pytest
|
|
105
|
+
python -m pytest -q
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Quick Start
|
|
109
|
+
|
|
110
|
+
Create the following files in a project with compatible UI dependencies installed:
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
my-app/
|
|
114
|
+
├── main.py
|
|
115
|
+
└── settings/
|
|
116
|
+
└── base.json
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**`settings/base.json`**
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"app_name": "My Application",
|
|
124
|
+
"framework": "PySide6",
|
|
125
|
+
"window": {
|
|
126
|
+
"width": 900,
|
|
127
|
+
"height": 600
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**`main.py`**
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
import sys
|
|
136
|
+
|
|
137
|
+
from qyro import VeltoContext
|
|
138
|
+
from psx import psx
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
class MyApp(VeltoContext):
|
|
142
|
+
def render(self):
|
|
143
|
+
return psx("""
|
|
144
|
+
<div>
|
|
145
|
+
<h1>Hello, world!</h1>
|
|
146
|
+
<p>Running with Qyro Engine.</p>
|
|
147
|
+
</div>
|
|
148
|
+
""")
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
if __name__ == "__main__":
|
|
152
|
+
sys.exit(MyApp().run())
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Run the application using your project's supported development command (or `python main.py` if the dependencies and application environment are installed directly).
|
|
156
|
+
|
|
157
|
+
Qyro uses the `framework` setting to initialize the renderer and start the application's event loop. The `framework` option must be configured explicitly. If the window dimensions are missing or invalid, Qyro defaults to `800 × 600`.
|
|
158
|
+
|
|
159
|
+
> [!TIP]
|
|
160
|
+
> For project generation and build tools, see [Velto CLI](https://github.com/Neuri-AI/velto-cli).
|
|
161
|
+
|
|
162
|
+
## UI Frameworks
|
|
163
|
+
|
|
164
|
+
The `framework` setting supports the following options when starting an application:
|
|
165
|
+
|
|
166
|
+
| Value | Technology | Considerations |
|
|
167
|
+
| --- | --- | --- |
|
|
168
|
+
| `PySide6` | Qt 6 | Requires the corresponding dependencies |
|
|
169
|
+
| `PyQt6` | Qt 6 | Requires the corresponding dependencies |
|
|
170
|
+
| `PySide2` | Qt 5 | Limited wheel availability depending on Python version and platform |
|
|
171
|
+
| `PyQt5` | Qt 5 | Requires the corresponding dependencies |
|
|
172
|
+
| `Kivy` | Kivy | Compatibility depends on the platform and installed adapter |
|
|
173
|
+
| `Tkinter` | Tk | Requires working Tk support in Python |
|
|
174
|
+
|
|
175
|
+
Compatibility should be verified for each combination of operating system, Python version, and dependencies.
|
|
176
|
+
|
|
177
|
+
## Configuration
|
|
178
|
+
|
|
179
|
+
Qyro locates application settings in the project's standard paths and merges them into `app_settings`.
|
|
180
|
+
|
|
181
|
+
```text
|
|
182
|
+
my-app/
|
|
183
|
+
├── main.py
|
|
184
|
+
├── settings/
|
|
185
|
+
│ ├── base.json # Shared settings
|
|
186
|
+
│ ├── windows.json # Windows-specific settings
|
|
187
|
+
│ ├── mac.json # macOS-specific settings
|
|
188
|
+
│ ├── linux.json # Linux-specific settings
|
|
189
|
+
│ ├── development.json # Development-only settings
|
|
190
|
+
│ ├── secrets.json # Local secrets (do not commit to Git)
|
|
191
|
+
│ └── sign.json # CLI-only; not runtime settings
|
|
192
|
+
└── resources/
|
|
193
|
+
├── base/
|
|
194
|
+
├── windows/
|
|
195
|
+
├── mac/
|
|
196
|
+
└── linux/
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Settings are merged in the following order:
|
|
200
|
+
|
|
201
|
+
1. `base.json` establishes the default values.
|
|
202
|
+
2. The corresponding platform profile overrides those values.
|
|
203
|
+
3. `development.json` contains development-specific settings and is applied when running in the development environment. Packaged applications do not load this profile.
|
|
204
|
+
4. If a local `secrets.json` file exists, its contents are merged into the settings.
|
|
205
|
+
5. The protected resource runtime applies the encrypted secrets payload, if available.
|
|
206
|
+
|
|
207
|
+
Standard settings profiles are merged recursively for nested objects. The final decrypted secrets payload is applied as top-level keys. The result is available through `app_settings`.
|
|
208
|
+
|
|
209
|
+
```python
|
|
210
|
+
# Inside a VeltoContext subclass:
|
|
211
|
+
settings = self.app_settings
|
|
212
|
+
app_name = settings.get("app_name", "My Application")
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Development Refresh Configuration
|
|
216
|
+
|
|
217
|
+
Qyro supports optional coordination with the hot reload module. When enabled in the project configuration, compatible store state can be captured and restored during a refresh:
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"hot_reload": {
|
|
222
|
+
"preserve_state": true
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Development change notifications use an authenticated local endpoint provided by the supervisor. Incompatible changes—such as modifications to a loaded native extension or a transition of the application's root host—may require a full process restart. The runtime does not enable live updates for packaged applications.
|
|
228
|
+
|
|
229
|
+
## Stylesheets and Resources
|
|
230
|
+
|
|
231
|
+
Qyro resolves resource paths whether the application runs from source code or a protected package.
|
|
232
|
+
|
|
233
|
+
```python
|
|
234
|
+
from qyro import get_resource
|
|
235
|
+
|
|
236
|
+
icon_path = get_resource("icons/app.png")
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
`get_resource()` returns an absolute filesystem path. It accepts multiple path segments and the `required=False` argument when a missing resource should not raise an error.
|
|
240
|
+
|
|
241
|
+
The application's main context also supports configuring stylesheets for Velto/PSX:
|
|
242
|
+
|
|
243
|
+
```json
|
|
244
|
+
{
|
|
245
|
+
"css": {
|
|
246
|
+
"stylesheets": ["css/styles.css"]
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Alternatively, `VeltoContext` subclasses can define a `stylesheets` tuple containing resource paths. Qyro prepares these resources for use during application rendering.
|
|
252
|
+
|
|
253
|
+
## Protected Resources and Secrets
|
|
254
|
+
|
|
255
|
+
Qyro supports compatible protected resource bundles. Protected runtime files are stored under **`.velto/`**:
|
|
256
|
+
|
|
257
|
+
```text
|
|
258
|
+
my-app/
|
|
259
|
+
└── .velto/
|
|
260
|
+
├── resources.pak
|
|
261
|
+
└── runtime*.so / runtime*.pyd
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Qyro Engine supports encrypting application secrets with AES-256-GCM, using HKDF-SHA256 for key derivation.
|
|
265
|
+
|
|
266
|
+
At runtime, Qyro locates the protected bundle, verifies its integrity, extracts the relevant `settings/` and `resources/` entries to a temporary runtime location, and makes resources accessible through the standard API. The runtime extension provides the protected cryptographic key material.
|
|
267
|
+
|
|
268
|
+
> [!WARNING]
|
|
269
|
+
> Protected resources and locally encrypted secrets reduce accidental exposure of stored data, but **do not guarantee confidentiality** against someone who controls the distributed application or its runtime memory. Do not include privileged server-side credentials in a client application.
|
|
270
|
+
|
|
271
|
+
## Runtime API
|
|
272
|
+
|
|
273
|
+
The public `qyro` module currently exports:
|
|
274
|
+
|
|
275
|
+
| Symbol | Description |
|
|
276
|
+
| --- | --- |
|
|
277
|
+
| `VeltoContext` | Base class for the application context |
|
|
278
|
+
| `EngineContainer` | Runtime dependency container |
|
|
279
|
+
| `PlatformDetector`, `PlatformType` | Platform detection and identifiers |
|
|
280
|
+
| `ExecutionMode` | Source or packaged application execution mode |
|
|
281
|
+
| `AppMetadata` | Application metadata and original settings |
|
|
282
|
+
| `get_resource(*segments, required=True)` | Resolves an application resource to an absolute path |
|
|
283
|
+
| `load_build_settings()` | Loads runtime settings into a dictionary |
|
|
284
|
+
| `is_frozen()` | Checks whether the application is packaged |
|
|
285
|
+
| `QyroEngineError` | Base engine exception |
|
|
286
|
+
| `ResourceNotFoundError` | Resource lookup error |
|
|
287
|
+
| `SettingsNotFoundError` | Settings lookup error |
|
|
288
|
+
| `FrameworkNotAvailableError` | Invalid or unavailable renderer |
|
|
289
|
+
|
|
290
|
+
### `VeltoContext`
|
|
291
|
+
|
|
292
|
+
```python
|
|
293
|
+
VeltoContext(
|
|
294
|
+
*,
|
|
295
|
+
custom_root: Path | None = None,
|
|
296
|
+
enable_sentry: bool = True,
|
|
297
|
+
argv: list[str] | None = None,
|
|
298
|
+
)
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
| Property | Purpose |
|
|
302
|
+
| --- | --- |
|
|
303
|
+
| `app_settings` | Merged runtime settings |
|
|
304
|
+
| `metadata` | Application metadata |
|
|
305
|
+
| `platform` | Current operating system enum |
|
|
306
|
+
| `execution_mode` | Source or packaged execution mode |
|
|
307
|
+
| `is_frozen` | Whether the application is running as a packaged application |
|
|
308
|
+
| `container` | Engine dependency container |
|
|
309
|
+
| `app` | Mounted application, or `None` before mounting |
|
|
310
|
+
| `renderer` | Active renderer, or `None` before mounting |
|
|
311
|
+
| `handle` | Native root handle, or `None` before mounting |
|
|
312
|
+
|
|
313
|
+
A subclass implements `render()` and calls `run()` to start the configured runtime. `VeltoContext` also supports `unmount()` for runtime cleanup. The `app` property represents the mounted application and is not necessarily a native instance of the UI framework.
|
|
314
|
+
|
|
315
|
+
### Package Names
|
|
316
|
+
|
|
317
|
+
| Purpose | Name |
|
|
318
|
+
| --- | --- |
|
|
319
|
+
| Distribution | `qyro-engine` |
|
|
320
|
+
| Import | `qyro` |
|
|
321
|
+
| Application context | `from qyro import VeltoContext` |
|
|
322
|
+
|
|
323
|
+
## Compatibility
|
|
324
|
+
|
|
325
|
+
Qyro Engine is designed for cross-platform application development on **Windows, macOS, Linux, Android, and iOS**.
|
|
326
|
+
|
|
327
|
+
Compatibility depends on the Python version, operating system, selected UI framework, and its dependencies.
|
|
328
|
+
|
|
329
|
+
## Qyro Settings Builder
|
|
330
|
+
|
|
331
|
+
[Velto Settings Builder](https://velto-settings-builder.up.railway.app/) is an auxiliary visual tool for preparing application and release configuration.
|
|
332
|
+
|
|
333
|
+
## 🤝 Contributing
|
|
334
|
+
|
|
335
|
+
Contributions to `qyro` are welcome.
|
|
336
|
+
|
|
337
|
+
1. Fork the repository on GitHub.
|
|
338
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`).
|
|
339
|
+
3. Run test suites (`poetry run pytest`).
|
|
340
|
+
4. Commit your changes (`git commit -m 'feat: add amazing feature'`).
|
|
341
|
+
5. Push to your branch (`git push origin feature/amazing-feature`).
|
|
342
|
+
6. Open a Pull Request.
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## 📄 License
|
|
347
|
+
|
|
348
|
+
Distributed under the [MIT License](LICENSE).
|
|
349
|
+
|
|
350
|
+
Maintained by [Neuri-AI](https://github.com/Neuri-AI). Project maintainer: [@runesc](https://github.com/runesc).
|
|
351
|
+
|