velto 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.
- velto-0.1.0/LICENSE +21 -0
- velto-0.1.0/NOTICE +159 -0
- velto-0.1.0/PKG-INFO +319 -0
- velto-0.1.0/README.md +280 -0
- velto-0.1.0/pyproject.toml +51 -0
- velto-0.1.0/velto/__init__.py +7 -0
- velto-0.1.0/velto/py.typed +1 -0
- velto-0.1.0/velto/runtime/__init__.py +22 -0
- velto-0.1.0/velto/state/__init__.py +35 -0
- velto-0.1.0/velto/ui/__init__.py +90 -0
velto-0.1.0/LICENSE
ADDED
|
@@ -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.
|
velto-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.
|
velto-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: velto
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: The public application facade for Qyro, PSX, and Pydux.
|
|
5
|
+
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
License-File: NOTICE
|
|
8
|
+
Author: Neuri
|
|
9
|
+
Requires-Python: >=3.10,<3.13.20
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
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
|
+
Provides-Extra: kivy
|
|
17
|
+
Provides-Extra: pyqt5
|
|
18
|
+
Provides-Extra: pyqt6
|
|
19
|
+
Provides-Extra: pyside2
|
|
20
|
+
Provides-Extra: pyside6
|
|
21
|
+
Provides-Extra: sentry
|
|
22
|
+
Provides-Extra: state
|
|
23
|
+
Requires-Dist: pydux-store[psx] (>=0.1.0,<1.0.0) ; extra == "state"
|
|
24
|
+
Requires-Dist: qyro-engine (>=0.1.0,<1.0.0)
|
|
25
|
+
Requires-Dist: qyro-engine[kivy] (>=0.1.0,<1.0.0) ; extra == "kivy"
|
|
26
|
+
Requires-Dist: qyro-engine[pyqt5] (>=0.1.0,<1.0.0) ; extra == "pyqt5"
|
|
27
|
+
Requires-Dist: qyro-engine[pyqt6] (>=0.1.0,<1.0.0) ; extra == "pyqt6"
|
|
28
|
+
Requires-Dist: qyro-engine[pyside2] (>=0.1.0,<1.0.0) ; extra == "pyside2"
|
|
29
|
+
Requires-Dist: qyro-engine[pyside6] (>=0.1.0,<1.0.0) ; extra == "pyside6"
|
|
30
|
+
Requires-Dist: qyro-engine[sentry] (>=0.1.0,<1.0.0) ; extra == "sentry"
|
|
31
|
+
Requires-Dist: velto-core (>=0.1.0,<1.0.0)
|
|
32
|
+
Requires-Dist: velto-core[kivy] (>=0.1.0,<1.0.0) ; extra == "kivy"
|
|
33
|
+
Requires-Dist: velto-core[pyqt5] (>=0.1.0,<1.0.0) ; extra == "pyqt5"
|
|
34
|
+
Requires-Dist: velto-core[pyqt6] (>=0.1.0,<1.0.0) ; extra == "pyqt6"
|
|
35
|
+
Requires-Dist: velto-core[pyside2] (>=0.1.0,<1.0.0) ; extra == "pyside2"
|
|
36
|
+
Requires-Dist: velto-core[pyside6] (>=0.1.0,<1.0.0) ; extra == "pyside6"
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
<p align="center">
|
|
40
|
+
<img src="https://ik.imagekit.io/kummiktgaiq/ppg/velto-logo_KcLcXCZnT.png" alt="Velto logo" width="45%" />
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
# Velto
|
|
44
|
+
Build native applications in Python with declarative, reactive interfaces
|
|
45
|
+
|
|
46
|
+
[](https://python.org)
|
|
47
|
+
[](https://github.com/Neuri-AI/velto/actions/workflows/matrix.yml)
|
|
48
|
+

|
|
49
|
+

|
|
50
|
+

|
|
51
|
+

|
|
52
|
+

|
|
53
|
+
[](LICENSE)
|
|
54
|
+
[](https://buymeacoffee.com/neuri)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
Velto is a Python framework for building native graphical applications using declarative components, reactive state, and a shared layout engine. It combines a Python-first development experience with native rendering through Qt, Tkinter, and Kivy—without requiring a web browser for the UI.
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
> **Project status:** Velto 0.1.x is an early-stage release. APIs, tooling, backend parity, and mobile deployment are actively evolving. Desktop support and mobile deployment have different levels of maturity.
|
|
61
|
+
|
|
62
|
+
## Highlights
|
|
63
|
+
|
|
64
|
+
- **Declarative Python UI:** Describe interfaces with PSX markup.
|
|
65
|
+
- **Reactive updates:** Build stateful components using hooks such as `use_state`, `use_effect`, and `use_ref`.
|
|
66
|
+
- **Native backends:** Render through Qt, Tkinter, and Kivy.
|
|
67
|
+
- **Styling and layout:** Use HTML-like elements, CSS-like styles, Flex, Grid, and scrolling primitives.
|
|
68
|
+
- **Native integration:** Embed toolkit widgets using `Native` and extend reactive updates through adapters.
|
|
69
|
+
- **Global state:** Integrate Pydux when local component state is not enough.
|
|
70
|
+
- **CLI:** Use the Velto CLI for project setup, execution, and packaging workflows.
|
|
71
|
+
|
|
72
|
+
## Quick start
|
|
73
|
+
|
|
74
|
+
The **recommended way to create, run, and package a Velto application is through [Velto CLI](https://github.com/Neuri-AI/Velto-CLI)**. It initializes the project structure, configures the selected native framework, and provides a consistent development and release workflow.
|
|
75
|
+
|
|
76
|
+
### 1. Install the CLI
|
|
77
|
+
|
|
78
|
+
Use a supported Python installation (Python 3.10–3.14 is a conservative choice; compatibility depends on package versions and the selected backend). A virtual environment is recommended:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
python -m venv .venv
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Activate it on macOS or Linux:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
source .venv/bin/activate
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Or on Windows (PowerShell):
|
|
91
|
+
|
|
92
|
+
```powershell
|
|
93
|
+
.venv\Scripts\Activate.ps1
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Then install the desktop tooling:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
python -m pip install --upgrade pip
|
|
100
|
+
python -m pip install "velto-cli[desktop]"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 2. Create your application
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
velto init --name my-app
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The interactive setup guides you through the available frameworks and project options. To select PySide6 explicitly:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
velto init --name my-app --framework pyside6
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Velto CLI supports desktop framework choices including **PySide6, PyQt6, PyQt5, PySide2, Kivy, and Tkinter**, subject to their platform and Python compatibility.
|
|
116
|
+
|
|
117
|
+
### 3. Start developing
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
cd my-app
|
|
121
|
+
velto start
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Edit the generated `main.py` and other project files. For example, a simple reactive component looks like this:
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
import sys
|
|
128
|
+
from velto import VeltoContext
|
|
129
|
+
from velto.ui import psx, use_state
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class CounterApp(VeltoContext):
|
|
133
|
+
def render(self):
|
|
134
|
+
count, set_count = use_state(0)
|
|
135
|
+
|
|
136
|
+
return psx("""
|
|
137
|
+
<div style="display: flex; flex-direction: column; gap: 16px; padding: 24px;">
|
|
138
|
+
<h1>Hello, Velto!</h1>
|
|
139
|
+
<p>Build reactive native interfaces with Python.</p>
|
|
140
|
+
<button on_click={() => set_count(count + 1)}>
|
|
141
|
+
Count is {count}
|
|
142
|
+
</button>
|
|
143
|
+
</div>
|
|
144
|
+
""")
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
if __name__ == "__main__":
|
|
148
|
+
sys.exit(CounterApp().run())
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
The example shows component-local reactive state. PSX updates the affected UI nodes and the selected backend renders the native widgets. Run the application using **`velto start`** from the project directory.
|
|
152
|
+
|
|
153
|
+
For a complete starter project with stylesheets and assets, see [examples/hello-world](examples/hello-world).
|
|
154
|
+
|
|
155
|
+
### 4. Build and distribute
|
|
156
|
+
|
|
157
|
+
From the project directory, build your desktop application:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
velto build
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
To produce a single executable, where supported:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
velto build --onefile
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
For distribution, use the CLI's platform-aware packaging workflow:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
velto bundle
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
The CLI also provides signing and release tools. See the [Velto CLI documentation](https://github.com/Neuri-AI/Velto-CLI) for packaging formats, settings, prerequisites, and platform-specific behavior.
|
|
176
|
+
|
|
177
|
+
> [!NOTE]
|
|
178
|
+
> Velto CLI is in alpha. Desktop development is the supported workflow; Android and iOS packaging are experimental and should not be treated as production-ready.
|
|
179
|
+
|
|
180
|
+
## Architecture
|
|
181
|
+
|
|
182
|
+
Velto exposes one application-facing interface while preserving clear responsibilities for each subsystem:
|
|
183
|
+
|
|
184
|
+
```text
|
|
185
|
+
Your Python application
|
|
186
|
+
|
|
|
187
|
+
velto (facade)
|
|
188
|
+
|
|
|
189
|
+
+-----------------+----------------+
|
|
190
|
+
| | |
|
|
191
|
+
Qyro Engine PSX Pydux (optional)
|
|
192
|
+
Runtime/lifecycle UI + reactivity Shared state
|
|
193
|
+
|
|
|
194
|
+
Cinnamon
|
|
195
|
+
Layout geometry
|
|
196
|
+
|
|
|
197
|
+
Native renderer adapters
|
|
198
|
+
|
|
|
199
|
+
Qt / Tkinter / Kivy
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
| Component | Responsibility | Repository |
|
|
203
|
+
| --- | --- | --- |
|
|
204
|
+
| **Velto** | Public application-facing imports | [Neuri-AI/Velto](https://github.com/Neuri-AI/Velto) |
|
|
205
|
+
| **Qyro Engine** | Application lifecycle, runtime services, and resource handling | [Neuri-AI/qyro](https://github.com/Neuri-AI/qyro) |
|
|
206
|
+
| **PSX / Velto Core** | Declarative markup, components, reconciliation, hooks, and native adapters | [Neuri-AI/PSX](https://github.com/Neuri-AI/PSX) |
|
|
207
|
+
| **Cinnamon** | Shared geometric layout computation used by PSX | [Neuri-AI/PSX](https://github.com/Neuri-AI/PSX) |
|
|
208
|
+
| **Pydux** | Optional store, reducers, selectors, and state integration | [Neuri-AI/Pydux](https://github.com/Neuri-AI/Pydux) |
|
|
209
|
+
| **Velto CLI** | Project development and packaging commands | [Neuri-AI/Velto-CLI](https://github.com/Neuri-AI/Velto-CLI) |
|
|
210
|
+
|
|
211
|
+
### What happens when Velto renders?
|
|
212
|
+
|
|
213
|
+
1. Your `VeltoContext` provides the application entry point and lifecycle.
|
|
214
|
+
2. PSX processes markup and component definitions into a virtual UI representation.
|
|
215
|
+
3. Hooks and reconciliation track state changes and determine which nodes need updating.
|
|
216
|
+
4. Cinnamon computes the layout geometry for the UI.
|
|
217
|
+
5. The selected renderer maps the result to native toolkit widgets.
|
|
218
|
+
|
|
219
|
+
The UI is **not rendered as an HTML page inside a browser**. Explicit native integrations, such as a web view embedded in an application, are available separately.
|
|
220
|
+
|
|
221
|
+
## Unified public API
|
|
222
|
+
|
|
223
|
+
```python
|
|
224
|
+
from velto import VeltoContext
|
|
225
|
+
from velto.ui import psx, component, use_state, use_effect, use_ref
|
|
226
|
+
from velto.ui import Flex, Grid, GridItem, Scroll, Text, Native, native_adapter
|
|
227
|
+
from velto.runtime import get_resource, is_frozen
|
|
228
|
+
|
|
229
|
+
# Optional: requires `velto[state]`
|
|
230
|
+
from velto.state import configure_store, create_slice, use_dispatch, use_selector
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Velto reexports the underlying libraries' public objects rather than maintaining a separate wrapper implementation. Existing applications importing from `qyro`, `psx`, or `pydux` can continue using those APIs.
|
|
234
|
+
|
|
235
|
+
See the [public API reference](docs/public-api.md) for the facade contract and integration details.
|
|
236
|
+
|
|
237
|
+
## Native widget integration
|
|
238
|
+
|
|
239
|
+
PSX can mount existing native widgets through the `Native` component. For reactive widget properties, use a widget-owned `update_props(self, props, changed)` method or register an adapter with `@native_adapter(WidgetType)`.
|
|
240
|
+
|
|
241
|
+
```python
|
|
242
|
+
from velto.ui import native_adapter
|
|
243
|
+
|
|
244
|
+
@native_adapter(MyWidget)
|
|
245
|
+
def update_my_widget(widget, props, changed):
|
|
246
|
+
if "value" in changed:
|
|
247
|
+
widget.set_value(props["value"])
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
```jsx
|
|
251
|
+
<Native widget={MyWidget} props={{"value": current_value}} />
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Native widget construction parameters can also be passed separately. Refer to the [native integration contract](docs/public-api.md) before using toolkit-specific APIs.
|
|
255
|
+
|
|
256
|
+
## Examples
|
|
257
|
+
|
|
258
|
+
Explore the working examples in this repository:
|
|
259
|
+
|
|
260
|
+
| Example | Description |
|
|
261
|
+
| --- | --- |
|
|
262
|
+
| [Hello World](examples/hello-world) | Minimal reactive application |
|
|
263
|
+
| [Dashboard](examples/dashboard) | Multi-section application layout |
|
|
264
|
+
| [Pydux login screen](examples/pydux-login-screen) | Optional centralized state integration |
|
|
265
|
+
| [Qt Charts](examples/qt-charts) | Native chart integration |
|
|
266
|
+
| [Chromium browser](examples/chromium-browser) | Browser component embedded as a native integration |
|
|
267
|
+
| [WebView app](examples/webview-app) | Web view integration |
|
|
268
|
+
| [Third-party libraries](examples/third-party-libraries) | Extending applications with external UI libraries |
|
|
269
|
+
|
|
270
|
+
## Platforms and compatibility
|
|
271
|
+
|
|
272
|
+
Velto targets desktop applications on **Linux, Windows, and macOS**, depending on the selected backend and its available native dependencies.
|
|
273
|
+
|
|
274
|
+
Android and iOS are areas of ongoing development. Mobile packaging and deployment should not yet be assumed to have the same maturity or compatibility coverage as desktop.
|
|
275
|
+
|
|
276
|
+
The current repository's package manifest requires `Python >=3.10,<3.13.20`, while [docs/compatibility.md](docs/compatibility.md) describes a broader 0.1.x certification range. When choosing an installation environment, use the published package metadata and the constraints of your selected backend as the source of truth.
|
|
277
|
+
|
|
278
|
+
## Development workflow
|
|
279
|
+
|
|
280
|
+
The [Velto CLI](https://github.com/Neuri-AI/Velto-CLI) provides commands for generating and working with projects:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
velto init
|
|
284
|
+
velto start
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
CLI installation, backend selection, and build options are documented in the CLI repository. Packaging and mobile build support vary by platform and backend.
|
|
288
|
+
|
|
289
|
+
To contribute to this facade repository:
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
git clone https://github.com/Neuri-AI/Velto.git
|
|
293
|
+
cd Velto
|
|
294
|
+
python -m pip install -e ".[pyside6]"
|
|
295
|
+
python -m pip install pytest
|
|
296
|
+
python -m pytest
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Some integration tests may require additional backend packages or platform-specific tools.
|
|
300
|
+
|
|
301
|
+
## Documentation
|
|
302
|
+
|
|
303
|
+
- [Public API and native integration](docs/public-api.md)
|
|
304
|
+
- [Compatibility matrix](docs/compatibility.md)
|
|
305
|
+
- [PSX source and documentation](https://github.com/Neuri-AI/PSX)
|
|
306
|
+
- [Qyro Engine](https://github.com/Neuri-AI/qyro)
|
|
307
|
+
- [Velto CLI](https://github.com/Neuri-AI/Velto-CLI)
|
|
308
|
+
- [Examples](examples)
|
|
309
|
+
|
|
310
|
+
## Contributing
|
|
311
|
+
|
|
312
|
+
Contributions, reproducible bug reports, and documentation improvements are welcome. Before submitting a change, review the relevant subsystem repository, provide a minimal reproduction for defects, and run the applicable test suite.
|
|
313
|
+
|
|
314
|
+
Open an [issue](https://github.com/Neuri-AI/Velto/issues) for facade-level bugs or feature discussions.
|
|
315
|
+
|
|
316
|
+
## License
|
|
317
|
+
|
|
318
|
+
Velto is released under the [MIT License](LICENSE). Individual runtime engines, UI bindings, and other dependencies may have their own license obligations; consult [NOTICE](NOTICE) and the corresponding upstream packages.
|
|
319
|
+
|
velto-0.1.0/README.md
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://ik.imagekit.io/kummiktgaiq/ppg/velto-logo_KcLcXCZnT.png" alt="Velto logo" width="45%" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# Velto
|
|
6
|
+
Build native applications in Python with declarative, reactive interfaces
|
|
7
|
+
|
|
8
|
+
[](https://python.org)
|
|
9
|
+
[](https://github.com/Neuri-AI/velto/actions/workflows/matrix.yml)
|
|
10
|
+

|
|
11
|
+

|
|
12
|
+

|
|
13
|
+

|
|
14
|
+

|
|
15
|
+
[](LICENSE)
|
|
16
|
+
[](https://buymeacoffee.com/neuri)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Velto is a Python framework for building native graphical applications using declarative components, reactive state, and a shared layout engine. It combines a Python-first development experience with native rendering through Qt, Tkinter, and Kivy—without requiring a web browser for the UI.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
> **Project status:** Velto 0.1.x is an early-stage release. APIs, tooling, backend parity, and mobile deployment are actively evolving. Desktop support and mobile deployment have different levels of maturity.
|
|
23
|
+
|
|
24
|
+
## Highlights
|
|
25
|
+
|
|
26
|
+
- **Declarative Python UI:** Describe interfaces with PSX markup.
|
|
27
|
+
- **Reactive updates:** Build stateful components using hooks such as `use_state`, `use_effect`, and `use_ref`.
|
|
28
|
+
- **Native backends:** Render through Qt, Tkinter, and Kivy.
|
|
29
|
+
- **Styling and layout:** Use HTML-like elements, CSS-like styles, Flex, Grid, and scrolling primitives.
|
|
30
|
+
- **Native integration:** Embed toolkit widgets using `Native` and extend reactive updates through adapters.
|
|
31
|
+
- **Global state:** Integrate Pydux when local component state is not enough.
|
|
32
|
+
- **CLI:** Use the Velto CLI for project setup, execution, and packaging workflows.
|
|
33
|
+
|
|
34
|
+
## Quick start
|
|
35
|
+
|
|
36
|
+
The **recommended way to create, run, and package a Velto application is through [Velto CLI](https://github.com/Neuri-AI/Velto-CLI)**. It initializes the project structure, configures the selected native framework, and provides a consistent development and release workflow.
|
|
37
|
+
|
|
38
|
+
### 1. Install the CLI
|
|
39
|
+
|
|
40
|
+
Use a supported Python installation (Python 3.10–3.14 is a conservative choice; compatibility depends on package versions and the selected backend). A virtual environment is recommended:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
python -m venv .venv
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Activate it on macOS or Linux:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
source .venv/bin/activate
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Or on Windows (PowerShell):
|
|
53
|
+
|
|
54
|
+
```powershell
|
|
55
|
+
.venv\Scripts\Activate.ps1
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Then install the desktop tooling:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
python -m pip install --upgrade pip
|
|
62
|
+
python -m pip install "velto-cli[desktop]"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 2. Create your application
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
velto init --name my-app
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The interactive setup guides you through the available frameworks and project options. To select PySide6 explicitly:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
velto init --name my-app --framework pyside6
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Velto CLI supports desktop framework choices including **PySide6, PyQt6, PyQt5, PySide2, Kivy, and Tkinter**, subject to their platform and Python compatibility.
|
|
78
|
+
|
|
79
|
+
### 3. Start developing
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
cd my-app
|
|
83
|
+
velto start
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Edit the generated `main.py` and other project files. For example, a simple reactive component looks like this:
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
import sys
|
|
90
|
+
from velto import VeltoContext
|
|
91
|
+
from velto.ui import psx, use_state
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class CounterApp(VeltoContext):
|
|
95
|
+
def render(self):
|
|
96
|
+
count, set_count = use_state(0)
|
|
97
|
+
|
|
98
|
+
return psx("""
|
|
99
|
+
<div style="display: flex; flex-direction: column; gap: 16px; padding: 24px;">
|
|
100
|
+
<h1>Hello, Velto!</h1>
|
|
101
|
+
<p>Build reactive native interfaces with Python.</p>
|
|
102
|
+
<button on_click={() => set_count(count + 1)}>
|
|
103
|
+
Count is {count}
|
|
104
|
+
</button>
|
|
105
|
+
</div>
|
|
106
|
+
""")
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
if __name__ == "__main__":
|
|
110
|
+
sys.exit(CounterApp().run())
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
The example shows component-local reactive state. PSX updates the affected UI nodes and the selected backend renders the native widgets. Run the application using **`velto start`** from the project directory.
|
|
114
|
+
|
|
115
|
+
For a complete starter project with stylesheets and assets, see [examples/hello-world](examples/hello-world).
|
|
116
|
+
|
|
117
|
+
### 4. Build and distribute
|
|
118
|
+
|
|
119
|
+
From the project directory, build your desktop application:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
velto build
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
To produce a single executable, where supported:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
velto build --onefile
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
For distribution, use the CLI's platform-aware packaging workflow:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
velto bundle
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The CLI also provides signing and release tools. See the [Velto CLI documentation](https://github.com/Neuri-AI/Velto-CLI) for packaging formats, settings, prerequisites, and platform-specific behavior.
|
|
138
|
+
|
|
139
|
+
> [!NOTE]
|
|
140
|
+
> Velto CLI is in alpha. Desktop development is the supported workflow; Android and iOS packaging are experimental and should not be treated as production-ready.
|
|
141
|
+
|
|
142
|
+
## Architecture
|
|
143
|
+
|
|
144
|
+
Velto exposes one application-facing interface while preserving clear responsibilities for each subsystem:
|
|
145
|
+
|
|
146
|
+
```text
|
|
147
|
+
Your Python application
|
|
148
|
+
|
|
|
149
|
+
velto (facade)
|
|
150
|
+
|
|
|
151
|
+
+-----------------+----------------+
|
|
152
|
+
| | |
|
|
153
|
+
Qyro Engine PSX Pydux (optional)
|
|
154
|
+
Runtime/lifecycle UI + reactivity Shared state
|
|
155
|
+
|
|
|
156
|
+
Cinnamon
|
|
157
|
+
Layout geometry
|
|
158
|
+
|
|
|
159
|
+
Native renderer adapters
|
|
160
|
+
|
|
|
161
|
+
Qt / Tkinter / Kivy
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
| Component | Responsibility | Repository |
|
|
165
|
+
| --- | --- | --- |
|
|
166
|
+
| **Velto** | Public application-facing imports | [Neuri-AI/Velto](https://github.com/Neuri-AI/Velto) |
|
|
167
|
+
| **Qyro Engine** | Application lifecycle, runtime services, and resource handling | [Neuri-AI/qyro](https://github.com/Neuri-AI/qyro) |
|
|
168
|
+
| **PSX / Velto Core** | Declarative markup, components, reconciliation, hooks, and native adapters | [Neuri-AI/PSX](https://github.com/Neuri-AI/PSX) |
|
|
169
|
+
| **Cinnamon** | Shared geometric layout computation used by PSX | [Neuri-AI/PSX](https://github.com/Neuri-AI/PSX) |
|
|
170
|
+
| **Pydux** | Optional store, reducers, selectors, and state integration | [Neuri-AI/Pydux](https://github.com/Neuri-AI/Pydux) |
|
|
171
|
+
| **Velto CLI** | Project development and packaging commands | [Neuri-AI/Velto-CLI](https://github.com/Neuri-AI/Velto-CLI) |
|
|
172
|
+
|
|
173
|
+
### What happens when Velto renders?
|
|
174
|
+
|
|
175
|
+
1. Your `VeltoContext` provides the application entry point and lifecycle.
|
|
176
|
+
2. PSX processes markup and component definitions into a virtual UI representation.
|
|
177
|
+
3. Hooks and reconciliation track state changes and determine which nodes need updating.
|
|
178
|
+
4. Cinnamon computes the layout geometry for the UI.
|
|
179
|
+
5. The selected renderer maps the result to native toolkit widgets.
|
|
180
|
+
|
|
181
|
+
The UI is **not rendered as an HTML page inside a browser**. Explicit native integrations, such as a web view embedded in an application, are available separately.
|
|
182
|
+
|
|
183
|
+
## Unified public API
|
|
184
|
+
|
|
185
|
+
```python
|
|
186
|
+
from velto import VeltoContext
|
|
187
|
+
from velto.ui import psx, component, use_state, use_effect, use_ref
|
|
188
|
+
from velto.ui import Flex, Grid, GridItem, Scroll, Text, Native, native_adapter
|
|
189
|
+
from velto.runtime import get_resource, is_frozen
|
|
190
|
+
|
|
191
|
+
# Optional: requires `velto[state]`
|
|
192
|
+
from velto.state import configure_store, create_slice, use_dispatch, use_selector
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Velto reexports the underlying libraries' public objects rather than maintaining a separate wrapper implementation. Existing applications importing from `qyro`, `psx`, or `pydux` can continue using those APIs.
|
|
196
|
+
|
|
197
|
+
See the [public API reference](docs/public-api.md) for the facade contract and integration details.
|
|
198
|
+
|
|
199
|
+
## Native widget integration
|
|
200
|
+
|
|
201
|
+
PSX can mount existing native widgets through the `Native` component. For reactive widget properties, use a widget-owned `update_props(self, props, changed)` method or register an adapter with `@native_adapter(WidgetType)`.
|
|
202
|
+
|
|
203
|
+
```python
|
|
204
|
+
from velto.ui import native_adapter
|
|
205
|
+
|
|
206
|
+
@native_adapter(MyWidget)
|
|
207
|
+
def update_my_widget(widget, props, changed):
|
|
208
|
+
if "value" in changed:
|
|
209
|
+
widget.set_value(props["value"])
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
```jsx
|
|
213
|
+
<Native widget={MyWidget} props={{"value": current_value}} />
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Native widget construction parameters can also be passed separately. Refer to the [native integration contract](docs/public-api.md) before using toolkit-specific APIs.
|
|
217
|
+
|
|
218
|
+
## Examples
|
|
219
|
+
|
|
220
|
+
Explore the working examples in this repository:
|
|
221
|
+
|
|
222
|
+
| Example | Description |
|
|
223
|
+
| --- | --- |
|
|
224
|
+
| [Hello World](examples/hello-world) | Minimal reactive application |
|
|
225
|
+
| [Dashboard](examples/dashboard) | Multi-section application layout |
|
|
226
|
+
| [Pydux login screen](examples/pydux-login-screen) | Optional centralized state integration |
|
|
227
|
+
| [Qt Charts](examples/qt-charts) | Native chart integration |
|
|
228
|
+
| [Chromium browser](examples/chromium-browser) | Browser component embedded as a native integration |
|
|
229
|
+
| [WebView app](examples/webview-app) | Web view integration |
|
|
230
|
+
| [Third-party libraries](examples/third-party-libraries) | Extending applications with external UI libraries |
|
|
231
|
+
|
|
232
|
+
## Platforms and compatibility
|
|
233
|
+
|
|
234
|
+
Velto targets desktop applications on **Linux, Windows, and macOS**, depending on the selected backend and its available native dependencies.
|
|
235
|
+
|
|
236
|
+
Android and iOS are areas of ongoing development. Mobile packaging and deployment should not yet be assumed to have the same maturity or compatibility coverage as desktop.
|
|
237
|
+
|
|
238
|
+
The current repository's package manifest requires `Python >=3.10,<3.13.20`, while [docs/compatibility.md](docs/compatibility.md) describes a broader 0.1.x certification range. When choosing an installation environment, use the published package metadata and the constraints of your selected backend as the source of truth.
|
|
239
|
+
|
|
240
|
+
## Development workflow
|
|
241
|
+
|
|
242
|
+
The [Velto CLI](https://github.com/Neuri-AI/Velto-CLI) provides commands for generating and working with projects:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
velto init
|
|
246
|
+
velto start
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
CLI installation, backend selection, and build options are documented in the CLI repository. Packaging and mobile build support vary by platform and backend.
|
|
250
|
+
|
|
251
|
+
To contribute to this facade repository:
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
git clone https://github.com/Neuri-AI/Velto.git
|
|
255
|
+
cd Velto
|
|
256
|
+
python -m pip install -e ".[pyside6]"
|
|
257
|
+
python -m pip install pytest
|
|
258
|
+
python -m pytest
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Some integration tests may require additional backend packages or platform-specific tools.
|
|
262
|
+
|
|
263
|
+
## Documentation
|
|
264
|
+
|
|
265
|
+
- [Public API and native integration](docs/public-api.md)
|
|
266
|
+
- [Compatibility matrix](docs/compatibility.md)
|
|
267
|
+
- [PSX source and documentation](https://github.com/Neuri-AI/PSX)
|
|
268
|
+
- [Qyro Engine](https://github.com/Neuri-AI/qyro)
|
|
269
|
+
- [Velto CLI](https://github.com/Neuri-AI/Velto-CLI)
|
|
270
|
+
- [Examples](examples)
|
|
271
|
+
|
|
272
|
+
## Contributing
|
|
273
|
+
|
|
274
|
+
Contributions, reproducible bug reports, and documentation improvements are welcome. Before submitting a change, review the relevant subsystem repository, provide a minimal reproduction for defects, and run the applicable test suite.
|
|
275
|
+
|
|
276
|
+
Open an [issue](https://github.com/Neuri-AI/Velto/issues) for facade-level bugs or feature discussions.
|
|
277
|
+
|
|
278
|
+
## License
|
|
279
|
+
|
|
280
|
+
Velto is released under the [MIT License](LICENSE). Individual runtime engines, UI bindings, and other dependencies may have their own license obligations; consult [NOTICE](NOTICE) and the corresponding upstream packages.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "velto"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "The public application facade for Qyro, PSX, and Pydux."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10,<3.13.20"
|
|
7
|
+
license = { text = "MIT" }
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "Neuri" },
|
|
10
|
+
]
|
|
11
|
+
dependencies = [
|
|
12
|
+
"qyro-engine>=0.1.0,<1.0.0",
|
|
13
|
+
"velto-core>=0.1.0,<1.0.0",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
[project.optional-dependencies]
|
|
17
|
+
state = ["pydux-store[psx]>=0.1.0,<1.0.0"]
|
|
18
|
+
pyside6 = [
|
|
19
|
+
"qyro-engine[pyside6]>=0.1.0,<1.0.0",
|
|
20
|
+
"velto-core[pyside6]>=0.1.0,<1.0.0",
|
|
21
|
+
]
|
|
22
|
+
pyqt6 = [
|
|
23
|
+
"qyro-engine[pyqt6]>=0.1.0,<1.0.0",
|
|
24
|
+
"velto-core[pyqt6]>=0.1.0,<1.0.0",
|
|
25
|
+
]
|
|
26
|
+
pyqt5 = [
|
|
27
|
+
"qyro-engine[pyqt5]>=0.1.0,<1.0.0",
|
|
28
|
+
"velto-core[pyqt5]>=0.1.0,<1.0.0",
|
|
29
|
+
]
|
|
30
|
+
pyside2 = [
|
|
31
|
+
"qyro-engine[pyside2]>=0.1.0,<1.0.0",
|
|
32
|
+
"velto-core[pyside2]>=0.1.0,<1.0.0",
|
|
33
|
+
]
|
|
34
|
+
kivy = [
|
|
35
|
+
"qyro-engine[kivy]>=0.1.0,<1.0.0",
|
|
36
|
+
"velto-core[kivy]>=0.1.0,<1.0.0",
|
|
37
|
+
]
|
|
38
|
+
sentry = ["qyro-engine[sentry]>=0.1.0,<1.0.0"]
|
|
39
|
+
|
|
40
|
+
[tool.poetry]
|
|
41
|
+
packages = [{ include = "velto" }]
|
|
42
|
+
|
|
43
|
+
[tool.poetry.group.dev.dependencies]
|
|
44
|
+
pytest = ">=8.0"
|
|
45
|
+
|
|
46
|
+
[build-system]
|
|
47
|
+
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
|
48
|
+
build-backend = "poetry.core.masonry.api"
|
|
49
|
+
|
|
50
|
+
[tool.pytest.ini_options]
|
|
51
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Runtime, configuration, and resource APIs supplied by Qyro."""
|
|
2
|
+
|
|
3
|
+
from qyro import (
|
|
4
|
+
AppMetadata,
|
|
5
|
+
EngineContainer,
|
|
6
|
+
ExecutionMode,
|
|
7
|
+
FrameworkNotAvailableError,
|
|
8
|
+
PlatformDetector,
|
|
9
|
+
PlatformType,
|
|
10
|
+
QyroEngineError,
|
|
11
|
+
ResourceNotFoundError,
|
|
12
|
+
SettingsNotFoundError,
|
|
13
|
+
get_resource,
|
|
14
|
+
is_frozen,
|
|
15
|
+
load_build_settings,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
__all__ = [
|
|
19
|
+
"AppMetadata", "EngineContainer", "ExecutionMode", "FrameworkNotAvailableError",
|
|
20
|
+
"PlatformDetector", "PlatformType", "QyroEngineError", "ResourceNotFoundError",
|
|
21
|
+
"SettingsNotFoundError", "get_resource", "is_frozen", "load_build_settings",
|
|
22
|
+
]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""State-management APIs supplied by Pydux."""
|
|
2
|
+
|
|
3
|
+
from pydux import (
|
|
4
|
+
Action,
|
|
5
|
+
Dispatch,
|
|
6
|
+
Middleware,
|
|
7
|
+
PyDuxDevTools,
|
|
8
|
+
PyDuxInspectorServer,
|
|
9
|
+
Reducer,
|
|
10
|
+
Selector,
|
|
11
|
+
Slice,
|
|
12
|
+
Store,
|
|
13
|
+
combine_reducers,
|
|
14
|
+
configure_store,
|
|
15
|
+
create_async_thunk,
|
|
16
|
+
create_selector,
|
|
17
|
+
create_slice,
|
|
18
|
+
create_thunk_middleware,
|
|
19
|
+
deep_equal,
|
|
20
|
+
devtools_middleware,
|
|
21
|
+
is_identical,
|
|
22
|
+
shallow_equal,
|
|
23
|
+
start_inspector,
|
|
24
|
+
StoreProvider,
|
|
25
|
+
use_dispatch,
|
|
26
|
+
use_selector,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
__all__ = [
|
|
30
|
+
"Action", "Dispatch", "Middleware", "PyDuxDevTools", "PyDuxInspectorServer", "Reducer",
|
|
31
|
+
"Selector", "Slice", "Store", "combine_reducers", "configure_store",
|
|
32
|
+
"create_async_thunk", "create_selector", "create_slice", "create_thunk_middleware",
|
|
33
|
+
"deep_equal", "devtools_middleware", "is_identical", "shallow_equal", "start_inspector",
|
|
34
|
+
"StoreProvider", "use_dispatch", "use_selector",
|
|
35
|
+
]
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""Declarative UI, hooks, rendering, and extension APIs supplied by PSX."""
|
|
2
|
+
|
|
3
|
+
from psx import (
|
|
4
|
+
App,
|
|
5
|
+
Badge,
|
|
6
|
+
Button,
|
|
7
|
+
Checkbox,
|
|
8
|
+
ComponentAdapter,
|
|
9
|
+
ComponentDefinition,
|
|
10
|
+
ComponentRegistry,
|
|
11
|
+
Divider,
|
|
12
|
+
DuplicateKeyError,
|
|
13
|
+
Flex,
|
|
14
|
+
Fragment,
|
|
15
|
+
Grid,
|
|
16
|
+
GridItem,
|
|
17
|
+
HookOrderError,
|
|
18
|
+
Image,
|
|
19
|
+
Input,
|
|
20
|
+
InvalidChildError,
|
|
21
|
+
Link,
|
|
22
|
+
MarkupSyntaxError,
|
|
23
|
+
Native,
|
|
24
|
+
NativeOwnership,
|
|
25
|
+
NativeWidget,
|
|
26
|
+
PLUGIN_ENTRY_POINT_GROUP,
|
|
27
|
+
PSXError,
|
|
28
|
+
Plugin,
|
|
29
|
+
PluginAPI,
|
|
30
|
+
ProgressBar,
|
|
31
|
+
Radio,
|
|
32
|
+
RadioGroup,
|
|
33
|
+
Ref,
|
|
34
|
+
RendererAdapterRegistry,
|
|
35
|
+
RendererCapabilities,
|
|
36
|
+
RendererCapabilityError,
|
|
37
|
+
RendererConfigurationError,
|
|
38
|
+
Scroll,
|
|
39
|
+
Select,
|
|
40
|
+
Slider,
|
|
41
|
+
Spacer,
|
|
42
|
+
SpinBox,
|
|
43
|
+
Switch,
|
|
44
|
+
Text,
|
|
45
|
+
TextArea,
|
|
46
|
+
ThreadViolationError,
|
|
47
|
+
VNode,
|
|
48
|
+
WebView,
|
|
49
|
+
builtin_component_registry,
|
|
50
|
+
component,
|
|
51
|
+
create_element,
|
|
52
|
+
load_plugins,
|
|
53
|
+
native_widget,
|
|
54
|
+
native_adapter,
|
|
55
|
+
psx,
|
|
56
|
+
register_adapter,
|
|
57
|
+
register_component,
|
|
58
|
+
renderer_capabilities,
|
|
59
|
+
use_effect,
|
|
60
|
+
use_ref,
|
|
61
|
+
use_state,
|
|
62
|
+
)
|
|
63
|
+
# Pydux is an optional state integration; PSX UI must work without it.
|
|
64
|
+
try:
|
|
65
|
+
from pydux import MainThreadBridge, Reactive, ReactiveBinding, connect, connect_qyro
|
|
66
|
+
except ImportError as error:
|
|
67
|
+
if not (error.name == "pydux" or (error.name or "").startswith("pydux.")):
|
|
68
|
+
raise
|
|
69
|
+
# The Pydux-specific names are deliberately not exposed when absent.
|
|
70
|
+
pass
|
|
71
|
+
|
|
72
|
+
__all__ = [
|
|
73
|
+
"App", "Badge", "Button", "Checkbox", "ComponentAdapter", "ComponentDefinition",
|
|
74
|
+
"ComponentRegistry", "Divider", "DuplicateKeyError", "Flex", "Fragment", "Grid",
|
|
75
|
+
"GridItem", "HookOrderError", "Image", "Input", "InvalidChildError", "Link",
|
|
76
|
+
"MainThreadBridge", "MarkupSyntaxError", "Native", "NativeOwnership", "NativeWidget",
|
|
77
|
+
"PLUGIN_ENTRY_POINT_GROUP", "PSXError", "Plugin", "PluginAPI", "ProgressBar",
|
|
78
|
+
"Radio", "RadioGroup", "Reactive",
|
|
79
|
+
"ReactiveBinding", "Ref", "RendererAdapterRegistry", "RendererCapabilities",
|
|
80
|
+
"RendererCapabilityError", "RendererConfigurationError", "Scroll", "Select", "Slider",
|
|
81
|
+
"Spacer", "SpinBox", "Switch", "Text", "TextArea", "WebView",
|
|
82
|
+
"ThreadViolationError", "VNode", "builtin_component_registry", "component", "connect",
|
|
83
|
+
"connect_qyro", "create_element", "load_plugins", "native_widget", "native_adapter", "psx",
|
|
84
|
+
"register_adapter", "register_component", "renderer_capabilities", "use_effect", "use_ref",
|
|
85
|
+
"use_state",
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
# Only publish Pydux integration symbols if the optional dependency is installed.
|
|
89
|
+
_PYDUX_NAMES = ("MainThreadBridge", "Reactive", "ReactiveBinding", "connect", "connect_qyro")
|
|
90
|
+
__all__ = [name for name in __all__ if name not in _PYDUX_NAMES or name in globals()]
|