qyro 2.0.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-2.0.0/LICENSE +21 -0
- qyro-2.0.0/PKG-INFO +244 -0
- qyro-2.0.0/README.md +161 -0
- qyro-2.0.0/pyproject.toml +127 -0
- qyro-2.0.0/qyro/__init__.py +17 -0
- qyro-2.0.0/qyro/adapters/__init__.py +4 -0
- qyro-2.0.0/qyro/adapters/language_adapters/__init__.py +4 -0
- qyro-2.0.0/qyro/adapters/language_adapters/c/__init__.py +4 -0
- qyro-2.0.0/qyro/adapters/language_adapters/python/__init__.py +4 -0
- qyro-2.0.0/qyro/adapters/language_adapters/python/python_adapter.py +584 -0
- qyro-2.0.0/qyro/cli/__init__.py +8 -0
- qyro-2.0.0/qyro/cli/__main__.py +5 -0
- qyro-2.0.0/qyro/cli/cli.py +392 -0
- qyro-2.0.0/qyro/cli/interactive.py +297 -0
- qyro-2.0.0/qyro/common/__init__.py +37 -0
- qyro-2.0.0/qyro/common/animation.py +82 -0
- qyro-2.0.0/qyro/common/builder.py +434 -0
- qyro-2.0.0/qyro/common/compiler.py +895 -0
- qyro-2.0.0/qyro/common/config.py +93 -0
- qyro-2.0.0/qyro/common/constants.py +99 -0
- qyro-2.0.0/qyro/common/errors.py +176 -0
- qyro-2.0.0/qyro/common/frontend.py +74 -0
- qyro-2.0.0/qyro/common/health.py +358 -0
- qyro-2.0.0/qyro/common/kafka_manager.py +192 -0
- qyro-2.0.0/qyro/common/logging.py +149 -0
- qyro-2.0.0/qyro/common/memory.py +147 -0
- qyro-2.0.0/qyro/common/metrics.py +301 -0
- qyro-2.0.0/qyro/common/monitoring.py +468 -0
- qyro-2.0.0/qyro/common/parser.py +91 -0
- qyro-2.0.0/qyro/common/platform.py +609 -0
- qyro-2.0.0/qyro/common/redis_memory.py +1108 -0
- qyro-2.0.0/qyro/common/rpc.py +287 -0
- qyro-2.0.0/qyro/common/sandbox.py +191 -0
- qyro-2.0.0/qyro/common/schema_loader.py +33 -0
- qyro-2.0.0/qyro/common/secure_sandbox.py +490 -0
- qyro-2.0.0/qyro/common/toolchain_validator.py +617 -0
- qyro-2.0.0/qyro/common/type_generator.py +176 -0
- qyro-2.0.0/qyro/common/validation.py +401 -0
- qyro-2.0.0/qyro/common/validator.py +204 -0
- qyro-2.0.0/qyro/gateway/__init__.py +8 -0
- qyro-2.0.0/qyro/gateway/gateway.py +303 -0
- qyro-2.0.0/qyro/orchestrator/__init__.py +8 -0
- qyro-2.0.0/qyro/orchestrator/orchestrator.py +1223 -0
- qyro-2.0.0/qyro.egg-info/PKG-INFO +244 -0
- qyro-2.0.0/qyro.egg-info/SOURCES.txt +50 -0
- qyro-2.0.0/qyro.egg-info/dependency_links.txt +1 -0
- qyro-2.0.0/qyro.egg-info/entry_points.txt +2 -0
- qyro-2.0.0/qyro.egg-info/not-zip-safe +1 -0
- qyro-2.0.0/qyro.egg-info/requires.txt +53 -0
- qyro-2.0.0/qyro.egg-info/top_level.txt +1 -0
- qyro-2.0.0/setup.cfg +4 -0
- qyro-2.0.0/setup.py +77 -0
qyro-2.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Qyro Team
|
|
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-2.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: qyro
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: The Universal Polyglot Runtime - Write Python, C, Rust, Java in one file with shared state
|
|
5
|
+
Home-page: https://github.com/qyro-dev/qyro
|
|
6
|
+
Author: Qyro Team
|
|
7
|
+
Author-email: Qyro Team <team@qyro.dev>
|
|
8
|
+
Maintainer-email: Qyro Maintainers <maintainers@qyro.dev>
|
|
9
|
+
License: MIT
|
|
10
|
+
Project-URL: Homepage, https://github.com/Flaxmbot/qyro
|
|
11
|
+
Project-URL: Documentation, https://github.com/Flaxmbot/qyro/wiki
|
|
12
|
+
Project-URL: Repository, https://github.com/Flaxmbot/qyro
|
|
13
|
+
Project-URL: Changelog, https://github.com/Flaxmbot/qyro/releases
|
|
14
|
+
Project-URL: Bug Tracker, https://github.com/Flaxmbot/qyro/issues
|
|
15
|
+
Keywords: polyglot,shared-state,ipc,ffi,multi-language,runtime,cross-platform,kafka,microservices,animation,rich,art
|
|
16
|
+
Classifier: Development Status :: 4 - Beta
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
26
|
+
Classifier: Topic :: Software Development :: Compilers
|
|
27
|
+
Classifier: Topic :: Software Development :: Interpreters
|
|
28
|
+
Classifier: Topic :: System :: Distributed Computing
|
|
29
|
+
Classifier: Topic :: Utilities
|
|
30
|
+
Classifier: Typing :: Typed
|
|
31
|
+
Requires-Python: >=3.8
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
License-File: LICENSE
|
|
34
|
+
Requires-Dist: click>=8.0
|
|
35
|
+
Requires-Dist: colorama>=0.4
|
|
36
|
+
Requires-Dist: typing-extensions>=4.0
|
|
37
|
+
Requires-Dist: redis>=5.0.0
|
|
38
|
+
Requires-Dist: docker>=7.0
|
|
39
|
+
Requires-Dist: psutil>=5.8.0
|
|
40
|
+
Requires-Dist: confluent-kafka>=2.0.0
|
|
41
|
+
Requires-Dist: fastapi>=0.100
|
|
42
|
+
Requires-Dist: uvicorn>=0.20
|
|
43
|
+
Requires-Dist: websockets>=11.0
|
|
44
|
+
Requires-Dist: pydantic>=2.0
|
|
45
|
+
Requires-Dist: pydantic-settings>=2.0
|
|
46
|
+
Requires-Dist: structlog>=23.0
|
|
47
|
+
Requires-Dist: aiokafka>=0.10.0
|
|
48
|
+
Requires-Dist: PyYAML>=6.0
|
|
49
|
+
Requires-Dist: rich>=13.0
|
|
50
|
+
Requires-Dist: questionary>=2.0
|
|
51
|
+
Requires-Dist: art>=6.0
|
|
52
|
+
Requires-Dist: pyfiglet>=1.0
|
|
53
|
+
Provides-Extra: redis
|
|
54
|
+
Requires-Dist: redis>=5.0.0; extra == "redis"
|
|
55
|
+
Provides-Extra: gateway
|
|
56
|
+
Requires-Dist: fastapi>=0.100; extra == "gateway"
|
|
57
|
+
Requires-Dist: uvicorn>=0.20; extra == "gateway"
|
|
58
|
+
Requires-Dist: websockets>=11.0; extra == "gateway"
|
|
59
|
+
Provides-Extra: ui
|
|
60
|
+
Requires-Dist: rich>=13.0; extra == "ui"
|
|
61
|
+
Requires-Dist: questionary>=2.0; extra == "ui"
|
|
62
|
+
Provides-Extra: docker
|
|
63
|
+
Requires-Dist: docker>=7.0; extra == "docker"
|
|
64
|
+
Provides-Extra: kafka
|
|
65
|
+
Requires-Dist: confluent-kafka>=2.0.0; extra == "kafka"
|
|
66
|
+
Requires-Dist: aiokafka>=0.10.0; extra == "kafka"
|
|
67
|
+
Provides-Extra: dev
|
|
68
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
69
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
70
|
+
Requires-Dist: black>=23.0; extra == "dev"
|
|
71
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
72
|
+
Requires-Dist: ruff>=0.1; extra == "dev"
|
|
73
|
+
Provides-Extra: animation
|
|
74
|
+
Requires-Dist: rich>=13.0; extra == "animation"
|
|
75
|
+
Requires-Dist: art>=6.0; extra == "animation"
|
|
76
|
+
Requires-Dist: pyfiglet>=1.0; extra == "animation"
|
|
77
|
+
Provides-Extra: full
|
|
78
|
+
Requires-Dist: qyro[animation,docker,gateway,kafka,redis,ui]; extra == "full"
|
|
79
|
+
Dynamic: author
|
|
80
|
+
Dynamic: home-page
|
|
81
|
+
Dynamic: license-file
|
|
82
|
+
Dynamic: requires-python
|
|
83
|
+
|
|
84
|
+
<div align="center">
|
|
85
|
+
<img src="docs/assets/qyro_logo.svg" alt="Qyro Logo" width="600">
|
|
86
|
+
|
|
87
|
+
<p align="center">
|
|
88
|
+
<b>The Universal Polyglot Runtime</b>
|
|
89
|
+
<br>
|
|
90
|
+
Write Python, C, Rust, Go, Java, and TypeScript in a <i>single file</i> with shared state and event streams.
|
|
91
|
+
</p>
|
|
92
|
+
|
|
93
|
+
[](https://opensource.org/licenses/MIT)
|
|
94
|
+
[](https://www.python.org/downloads/)
|
|
95
|
+
[](https://redis.io/)
|
|
96
|
+
[](https://kafka.apache.org/)
|
|
97
|
+
[]()
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
<div align="center">
|
|
103
|
+
<img src="docs/assets/terminal_demo.svg" alt="Qyro Terminal Demo" width="800">
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 🚀 The Singularity for Code
|
|
109
|
+
|
|
110
|
+
**Qyro** breaks down language barriers. It allows you to define an entire distributed system—backend logic, high-performance kernels, and frontend UI—in a single `.qyro` file.
|
|
111
|
+
|
|
112
|
+
The **Qyro Orchestrator** parses this file, compiles native code (C/Rust/Go) on the fly, launches microservices, and connects them via a high-speed **Shared Memory Event Bus** (Redis) and **Reliable Event Streaming** (Kafka).
|
|
113
|
+
|
|
114
|
+
### ✨ Key Features
|
|
115
|
+
|
|
116
|
+
| Feature | Description |
|
|
117
|
+
|---------|-------------|
|
|
118
|
+
| **🏳️🌈 Polyglot** | Mix Python, C, Rust, Go, Java, TypeScript, and React in one file. |
|
|
119
|
+
| **🧠 Shared State** | Zero-latency variable sharing across languages via Redis. |
|
|
120
|
+
| **📡 Event Driven** | Built-in Kafka integration for reliable, scalable messaging. |
|
|
121
|
+
| **🛡️ Self-Healing** | Automatic process supervision, crash detection, and exponential backoff. |
|
|
122
|
+
| **⚡ High Performance** | Compile native modules on-the-fly for critical paths. |
|
|
123
|
+
| **🌐 API Gateway** | Integrated WebSocket/HTTP gateway for external access. |
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 🏗️ Architecture
|
|
128
|
+
|
|
129
|
+
Qyro isn't just a runner; it's a complete operating environment.
|
|
130
|
+
|
|
131
|
+
```mermaid
|
|
132
|
+
graph TD
|
|
133
|
+
%% Styling
|
|
134
|
+
classDef core fill:#1e1e1e,stroke:#00d4ff,stroke-width:2px,color:#fff
|
|
135
|
+
classDef polyglot fill:#2d2d2d,stroke:#00ff9d,stroke-width:2px,color:#fff
|
|
136
|
+
classDef store fill:#1e1e1e,stroke:#ff00aa,stroke-width:2px,color:#fff
|
|
137
|
+
classDef stream fill:#1e1e1e,stroke:#fff,stroke-width:2px,color:#fff
|
|
138
|
+
|
|
139
|
+
subgraph Singularity["The Singularity (main.qyro)"]
|
|
140
|
+
direction TB
|
|
141
|
+
Src["Source Code"] -->|Parser| Parse["Qyro Parser"]
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
Parse -->|Compiles| BinC["C/Rust/Go Binaries"]
|
|
145
|
+
Parse -->|Prepares| ScriptPy["Python/TS Scripts"]
|
|
146
|
+
|
|
147
|
+
subgraph Runtime["Runtime Environment"]
|
|
148
|
+
direction TB
|
|
149
|
+
Orch["Qyro Orchestrator"]
|
|
150
|
+
|
|
151
|
+
P1["Process 1 (Python)"]
|
|
152
|
+
P2["Process 2 (C/Rust)"]
|
|
153
|
+
P3["Process 3 (Node)"]
|
|
154
|
+
|
|
155
|
+
Orch -->|Supervises| P1
|
|
156
|
+
Orch -->|Supervises| P2
|
|
157
|
+
Orch -->|Supervises| P3
|
|
158
|
+
|
|
159
|
+
GW["API Gateway"] <-->|WS/HTTP| P1
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
P1 <-->|Read/Write| Redis[("Redis Shared State")]
|
|
163
|
+
P2 <-->|Read/Write| Redis
|
|
164
|
+
P3 <-->|Read/Write| Redis
|
|
165
|
+
|
|
166
|
+
P1 <-->|Pub/Sub| Kafka{"Kafka Event Bus"}
|
|
167
|
+
P2 <-->|Pub/Sub| Kafka
|
|
168
|
+
|
|
169
|
+
%% Apply styles
|
|
170
|
+
class Src,Parse,Orch,GW core
|
|
171
|
+
class P1,P2,P3,BinC,ScriptPy polyglot
|
|
172
|
+
class Redis store
|
|
173
|
+
class Kafka stream
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## ⚡ Quick Start
|
|
179
|
+
|
|
180
|
+
### Prerequisites
|
|
181
|
+
* Python 3.8+
|
|
182
|
+
* Redis (Optional, for shared state)
|
|
183
|
+
* Kafka (Optional, for event streaming)
|
|
184
|
+
|
|
185
|
+
### Installation
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
git clone https://github.com/qyro-dev/qyro.git
|
|
189
|
+
cd qyro
|
|
190
|
+
pip install -r requirements.txt
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Running Your First App
|
|
194
|
+
|
|
195
|
+
Create a file named `hello.qyro`:
|
|
196
|
+
|
|
197
|
+
```python
|
|
198
|
+
>>>schema:global
|
|
199
|
+
# Define shared state variables
|
|
200
|
+
counter: int
|
|
201
|
+
|
|
202
|
+
>>>python:p1
|
|
203
|
+
import time
|
|
204
|
+
from qyro.lib import shared
|
|
205
|
+
print("Python: Starting counter...")
|
|
206
|
+
while True:
|
|
207
|
+
val = shared.get("counter") or 0
|
|
208
|
+
shared.set("counter", val + 1)
|
|
209
|
+
time.sleep(1)
|
|
210
|
+
|
|
211
|
+
>>>c:p2
|
|
212
|
+
#include <stdio.h>
|
|
213
|
+
// C code runs natively!
|
|
214
|
+
int main() {
|
|
215
|
+
printf("C Module: Watching shared memory...\n");
|
|
216
|
+
while(1) {
|
|
217
|
+
// Pseudo-code for brevity
|
|
218
|
+
sleep(1);
|
|
219
|
+
}
|
|
220
|
+
return 0;
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Run it:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
python run.py hello.qyro
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## 📚 Documentation
|
|
233
|
+
|
|
234
|
+
Detailed documentation is available in the [Wiki](https://github.com/qyro-dev/qyro/wiki).
|
|
235
|
+
|
|
236
|
+
* [Language Reference](https://github.com/qyro-dev/qyro/wiki/Language-Reference)
|
|
237
|
+
* [API Guide](https://github.com/qyro-dev/qyro/wiki/API-Guide)
|
|
238
|
+
* [Deployment](https://github.com/qyro-dev/qyro/wiki/Deployment)
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
<div align="center">
|
|
243
|
+
<sub>Built with ❤️ by the Qyro Team. Code simpler. Build faster. Scale infinitely.</sub>
|
|
244
|
+
</div>
|
qyro-2.0.0/README.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="docs/assets/qyro_logo.svg" alt="Qyro Logo" width="600">
|
|
3
|
+
|
|
4
|
+
<p align="center">
|
|
5
|
+
<b>The Universal Polyglot Runtime</b>
|
|
6
|
+
<br>
|
|
7
|
+
Write Python, C, Rust, Go, Java, and TypeScript in a <i>single file</i> with shared state and event streams.
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
[](https://opensource.org/licenses/MIT)
|
|
11
|
+
[](https://www.python.org/downloads/)
|
|
12
|
+
[](https://redis.io/)
|
|
13
|
+
[](https://kafka.apache.org/)
|
|
14
|
+
[]()
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
<div align="center">
|
|
20
|
+
<img src="docs/assets/terminal_demo.svg" alt="Qyro Terminal Demo" width="800">
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 🚀 The Singularity for Code
|
|
26
|
+
|
|
27
|
+
**Qyro** breaks down language barriers. It allows you to define an entire distributed system—backend logic, high-performance kernels, and frontend UI—in a single `.qyro` file.
|
|
28
|
+
|
|
29
|
+
The **Qyro Orchestrator** parses this file, compiles native code (C/Rust/Go) on the fly, launches microservices, and connects them via a high-speed **Shared Memory Event Bus** (Redis) and **Reliable Event Streaming** (Kafka).
|
|
30
|
+
|
|
31
|
+
### ✨ Key Features
|
|
32
|
+
|
|
33
|
+
| Feature | Description |
|
|
34
|
+
|---------|-------------|
|
|
35
|
+
| **🏳️🌈 Polyglot** | Mix Python, C, Rust, Go, Java, TypeScript, and React in one file. |
|
|
36
|
+
| **🧠 Shared State** | Zero-latency variable sharing across languages via Redis. |
|
|
37
|
+
| **📡 Event Driven** | Built-in Kafka integration for reliable, scalable messaging. |
|
|
38
|
+
| **🛡️ Self-Healing** | Automatic process supervision, crash detection, and exponential backoff. |
|
|
39
|
+
| **⚡ High Performance** | Compile native modules on-the-fly for critical paths. |
|
|
40
|
+
| **🌐 API Gateway** | Integrated WebSocket/HTTP gateway for external access. |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 🏗️ Architecture
|
|
45
|
+
|
|
46
|
+
Qyro isn't just a runner; it's a complete operating environment.
|
|
47
|
+
|
|
48
|
+
```mermaid
|
|
49
|
+
graph TD
|
|
50
|
+
%% Styling
|
|
51
|
+
classDef core fill:#1e1e1e,stroke:#00d4ff,stroke-width:2px,color:#fff
|
|
52
|
+
classDef polyglot fill:#2d2d2d,stroke:#00ff9d,stroke-width:2px,color:#fff
|
|
53
|
+
classDef store fill:#1e1e1e,stroke:#ff00aa,stroke-width:2px,color:#fff
|
|
54
|
+
classDef stream fill:#1e1e1e,stroke:#fff,stroke-width:2px,color:#fff
|
|
55
|
+
|
|
56
|
+
subgraph Singularity["The Singularity (main.qyro)"]
|
|
57
|
+
direction TB
|
|
58
|
+
Src["Source Code"] -->|Parser| Parse["Qyro Parser"]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
Parse -->|Compiles| BinC["C/Rust/Go Binaries"]
|
|
62
|
+
Parse -->|Prepares| ScriptPy["Python/TS Scripts"]
|
|
63
|
+
|
|
64
|
+
subgraph Runtime["Runtime Environment"]
|
|
65
|
+
direction TB
|
|
66
|
+
Orch["Qyro Orchestrator"]
|
|
67
|
+
|
|
68
|
+
P1["Process 1 (Python)"]
|
|
69
|
+
P2["Process 2 (C/Rust)"]
|
|
70
|
+
P3["Process 3 (Node)"]
|
|
71
|
+
|
|
72
|
+
Orch -->|Supervises| P1
|
|
73
|
+
Orch -->|Supervises| P2
|
|
74
|
+
Orch -->|Supervises| P3
|
|
75
|
+
|
|
76
|
+
GW["API Gateway"] <-->|WS/HTTP| P1
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
P1 <-->|Read/Write| Redis[("Redis Shared State")]
|
|
80
|
+
P2 <-->|Read/Write| Redis
|
|
81
|
+
P3 <-->|Read/Write| Redis
|
|
82
|
+
|
|
83
|
+
P1 <-->|Pub/Sub| Kafka{"Kafka Event Bus"}
|
|
84
|
+
P2 <-->|Pub/Sub| Kafka
|
|
85
|
+
|
|
86
|
+
%% Apply styles
|
|
87
|
+
class Src,Parse,Orch,GW core
|
|
88
|
+
class P1,P2,P3,BinC,ScriptPy polyglot
|
|
89
|
+
class Redis store
|
|
90
|
+
class Kafka stream
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## ⚡ Quick Start
|
|
96
|
+
|
|
97
|
+
### Prerequisites
|
|
98
|
+
* Python 3.8+
|
|
99
|
+
* Redis (Optional, for shared state)
|
|
100
|
+
* Kafka (Optional, for event streaming)
|
|
101
|
+
|
|
102
|
+
### Installation
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
git clone https://github.com/qyro-dev/qyro.git
|
|
106
|
+
cd qyro
|
|
107
|
+
pip install -r requirements.txt
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Running Your First App
|
|
111
|
+
|
|
112
|
+
Create a file named `hello.qyro`:
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
>>>schema:global
|
|
116
|
+
# Define shared state variables
|
|
117
|
+
counter: int
|
|
118
|
+
|
|
119
|
+
>>>python:p1
|
|
120
|
+
import time
|
|
121
|
+
from qyro.lib import shared
|
|
122
|
+
print("Python: Starting counter...")
|
|
123
|
+
while True:
|
|
124
|
+
val = shared.get("counter") or 0
|
|
125
|
+
shared.set("counter", val + 1)
|
|
126
|
+
time.sleep(1)
|
|
127
|
+
|
|
128
|
+
>>>c:p2
|
|
129
|
+
#include <stdio.h>
|
|
130
|
+
// C code runs natively!
|
|
131
|
+
int main() {
|
|
132
|
+
printf("C Module: Watching shared memory...\n");
|
|
133
|
+
while(1) {
|
|
134
|
+
// Pseudo-code for brevity
|
|
135
|
+
sleep(1);
|
|
136
|
+
}
|
|
137
|
+
return 0;
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Run it:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
python run.py hello.qyro
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 📚 Documentation
|
|
150
|
+
|
|
151
|
+
Detailed documentation is available in the [Wiki](https://github.com/qyro-dev/qyro/wiki).
|
|
152
|
+
|
|
153
|
+
* [Language Reference](https://github.com/qyro-dev/qyro/wiki/Language-Reference)
|
|
154
|
+
* [API Guide](https://github.com/qyro-dev/qyro/wiki/API-Guide)
|
|
155
|
+
* [Deployment](https://github.com/qyro-dev/qyro/wiki/Deployment)
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
<div align="center">
|
|
160
|
+
<sub>Built with ❤️ by the Qyro Team. Code simpler. Build faster. Scale infinitely.</sub>
|
|
161
|
+
</div>
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "qyro"
|
|
7
|
+
version = "2.0.0"
|
|
8
|
+
description = "The Universal Polyglot Runtime - Write Python, C, Rust, Java in one file with shared state"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
authors = [
|
|
12
|
+
{name = "Qyro Team", email = "team@qyro.dev"},
|
|
13
|
+
]
|
|
14
|
+
maintainers = [
|
|
15
|
+
{name = "Qyro Maintainers", email = "maintainers@qyro.dev"},
|
|
16
|
+
]
|
|
17
|
+
keywords = ["polyglot", "shared-state", "ipc", "ffi", "multi-language", "runtime", "cross-platform", "kafka", "microservices", "animation", "rich", "art"]
|
|
18
|
+
classifiers = [
|
|
19
|
+
"Development Status :: 4 - Beta",
|
|
20
|
+
"Intended Audience :: Developers",
|
|
21
|
+
"License :: OSI Approved :: MIT License",
|
|
22
|
+
"Operating System :: OS Independent",
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"Programming Language :: Python :: 3.8",
|
|
25
|
+
"Programming Language :: Python :: 3.9",
|
|
26
|
+
"Programming Language :: Python :: 3.10",
|
|
27
|
+
"Programming Language :: Python :: 3.11",
|
|
28
|
+
"Programming Language :: Python :: 3.12",
|
|
29
|
+
"Topic :: Software Development :: Compilers",
|
|
30
|
+
"Topic :: Software Development :: Interpreters",
|
|
31
|
+
"Topic :: System :: Distributed Computing",
|
|
32
|
+
"Topic :: Utilities",
|
|
33
|
+
"Typing :: Typed",
|
|
34
|
+
]
|
|
35
|
+
requires-python = ">=3.8"
|
|
36
|
+
|
|
37
|
+
# Core dependencies (always installed)
|
|
38
|
+
dependencies = [
|
|
39
|
+
"click>=8.0",
|
|
40
|
+
"colorama>=0.4",
|
|
41
|
+
"typing-extensions>=4.0",
|
|
42
|
+
"redis>=5.0.0",
|
|
43
|
+
"docker>=7.0",
|
|
44
|
+
"psutil>=5.8.0",
|
|
45
|
+
"confluent-kafka>=2.0.0",
|
|
46
|
+
"fastapi>=0.100",
|
|
47
|
+
"uvicorn>=0.20",
|
|
48
|
+
"websockets>=11.0",
|
|
49
|
+
"pydantic>=2.0",
|
|
50
|
+
"pydantic-settings>=2.0",
|
|
51
|
+
"structlog>=23.0",
|
|
52
|
+
"aiokafka>=0.10.0",
|
|
53
|
+
"PyYAML>=6.0",
|
|
54
|
+
"rich>=13.0",
|
|
55
|
+
"questionary>=2.0",
|
|
56
|
+
"art>=6.0",
|
|
57
|
+
"pyfiglet>=1.0",
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
# Optional feature dependencies
|
|
61
|
+
[project.optional-dependencies]
|
|
62
|
+
redis = [
|
|
63
|
+
"redis>=5.0.0"
|
|
64
|
+
]
|
|
65
|
+
gateway = [
|
|
66
|
+
"fastapi>=0.100",
|
|
67
|
+
"uvicorn>=0.20",
|
|
68
|
+
"websockets>=11.0"
|
|
69
|
+
]
|
|
70
|
+
ui = [
|
|
71
|
+
"rich>=13.0",
|
|
72
|
+
"questionary>=2.0"
|
|
73
|
+
]
|
|
74
|
+
docker = [
|
|
75
|
+
"docker>=7.0"
|
|
76
|
+
]
|
|
77
|
+
kafka = [
|
|
78
|
+
"confluent-kafka>=2.0.0",
|
|
79
|
+
"aiokafka>=0.10.0"
|
|
80
|
+
]
|
|
81
|
+
dev = [
|
|
82
|
+
"pytest>=7.0",
|
|
83
|
+
"pytest-cov>=4.0",
|
|
84
|
+
"black>=23.0",
|
|
85
|
+
"mypy>=1.0",
|
|
86
|
+
"ruff>=0.1"
|
|
87
|
+
]
|
|
88
|
+
animation = [
|
|
89
|
+
"rich>=13.0",
|
|
90
|
+
"art>=6.0",
|
|
91
|
+
"pyfiglet>=1.0"
|
|
92
|
+
]
|
|
93
|
+
full = [
|
|
94
|
+
"qyro[redis,gateway,ui,docker,kafka,animation]"
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
[project.scripts]
|
|
98
|
+
qyro = "qyro.cli.cli:main"
|
|
99
|
+
|
|
100
|
+
[project.urls]
|
|
101
|
+
Homepage = "https://github.com/Flaxmbot/qyro"
|
|
102
|
+
Documentation = "https://github.com/Flaxmbot/qyro/wiki"
|
|
103
|
+
Repository = "https://github.com/Flaxmbot/qyro"
|
|
104
|
+
Changelog = "https://github.com/Flaxmbot/qyro/releases"
|
|
105
|
+
"Bug Tracker" = "https://github.com/Flaxmbot/qyro/issues"
|
|
106
|
+
|
|
107
|
+
[tool.setuptools.packages.find]
|
|
108
|
+
where = ["."]
|
|
109
|
+
include = ["qyro*"]
|
|
110
|
+
namespaces = false
|
|
111
|
+
|
|
112
|
+
[tool.black]
|
|
113
|
+
line-length = 100
|
|
114
|
+
target-version = ["py38", "py39", "py310", "py311"]
|
|
115
|
+
|
|
116
|
+
[tool.ruff]
|
|
117
|
+
line-length = 100
|
|
118
|
+
select = ["E", "F", "W", "I", "N"]
|
|
119
|
+
|
|
120
|
+
[tool.pytest.ini_options]
|
|
121
|
+
testpaths = ["tests"]
|
|
122
|
+
python_files = ["test_*.py"]
|
|
123
|
+
addopts = "--strict-markers --strict-config"
|
|
124
|
+
markers = [
|
|
125
|
+
"slow: marks tests as slow",
|
|
126
|
+
"integration: marks tests as integration tests"
|
|
127
|
+
]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Qyro - Universal Polyglot Runtime
|
|
3
|
+
The Universal Polyglot Runtime - Write Python, C, Rust, Java in one file with shared state and modern microservices architecture.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
__version__ = "2.0.0"
|
|
7
|
+
__author__ = "Qyro Team"
|
|
8
|
+
__email__ = "team@qyro.dev"
|
|
9
|
+
|
|
10
|
+
# Define the package exports
|
|
11
|
+
__all__ = [
|
|
12
|
+
'orchestrator',
|
|
13
|
+
'common',
|
|
14
|
+
'cli',
|
|
15
|
+
'gateway',
|
|
16
|
+
'adapters'
|
|
17
|
+
]
|