qyro 2.0.0__py3-none-any.whl

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.
Files changed (45) hide show
  1. qyro/__init__.py +17 -0
  2. qyro/adapters/__init__.py +4 -0
  3. qyro/adapters/language_adapters/__init__.py +4 -0
  4. qyro/adapters/language_adapters/c/__init__.py +4 -0
  5. qyro/adapters/language_adapters/python/__init__.py +4 -0
  6. qyro/adapters/language_adapters/python/python_adapter.py +584 -0
  7. qyro/cli/__init__.py +8 -0
  8. qyro/cli/__main__.py +5 -0
  9. qyro/cli/cli.py +392 -0
  10. qyro/cli/interactive.py +297 -0
  11. qyro/common/__init__.py +37 -0
  12. qyro/common/animation.py +82 -0
  13. qyro/common/builder.py +434 -0
  14. qyro/common/compiler.py +895 -0
  15. qyro/common/config.py +93 -0
  16. qyro/common/constants.py +99 -0
  17. qyro/common/errors.py +176 -0
  18. qyro/common/frontend.py +74 -0
  19. qyro/common/health.py +358 -0
  20. qyro/common/kafka_manager.py +192 -0
  21. qyro/common/logging.py +149 -0
  22. qyro/common/memory.py +147 -0
  23. qyro/common/metrics.py +301 -0
  24. qyro/common/monitoring.py +468 -0
  25. qyro/common/parser.py +91 -0
  26. qyro/common/platform.py +609 -0
  27. qyro/common/redis_memory.py +1108 -0
  28. qyro/common/rpc.py +287 -0
  29. qyro/common/sandbox.py +191 -0
  30. qyro/common/schema_loader.py +33 -0
  31. qyro/common/secure_sandbox.py +490 -0
  32. qyro/common/toolchain_validator.py +617 -0
  33. qyro/common/type_generator.py +176 -0
  34. qyro/common/validation.py +401 -0
  35. qyro/common/validator.py +204 -0
  36. qyro/gateway/__init__.py +8 -0
  37. qyro/gateway/gateway.py +303 -0
  38. qyro/orchestrator/__init__.py +8 -0
  39. qyro/orchestrator/orchestrator.py +1223 -0
  40. qyro-2.0.0.dist-info/METADATA +244 -0
  41. qyro-2.0.0.dist-info/RECORD +45 -0
  42. qyro-2.0.0.dist-info/WHEEL +5 -0
  43. qyro-2.0.0.dist-info/entry_points.txt +2 -0
  44. qyro-2.0.0.dist-info/licenses/LICENSE +21 -0
  45. qyro-2.0.0.dist-info/top_level.txt +1 -0
@@ -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
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
94
+ [![Python](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
95
+ [![Redis](https://img.shields.io/badge/redis-enabled-red.svg)](https://redis.io/)
96
+ [![Kafka](https://img.shields.io/badge/kafka-streaming-black.svg)](https://kafka.apache.org/)
97
+ [![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg)]()
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>
@@ -0,0 +1,45 @@
1
+ qyro/__init__.py,sha256=mKhWtdRdQCuuGkL_bX1IrkVzHfes5xQrEJ7VwRoBOKE,382
2
+ qyro/adapters/__init__.py,sha256=9Q7k8vTdVfQnvcmNeh_QgOAt3GUvIZc8cTcKm4t_a-4,85
3
+ qyro/adapters/language_adapters/__init__.py,sha256=eGNVo1WB46z4tQ3_hGH5KJRVGWJKC6yRL2nzCR8_4NM,86
4
+ qyro/adapters/language_adapters/c/__init__.py,sha256=1X1wwFdvrBvt9d3-AExeLNSsyGC8rvBLG7_6SAJrXTY,78
5
+ qyro/adapters/language_adapters/python/__init__.py,sha256=Nh1fyMjpmqhhT-4sLde6O4Lr47R3Lsjz05S93h9emvk,81
6
+ qyro/adapters/language_adapters/python/python_adapter.py,sha256=k_zXuUpXVUFM5GwkXbif7VOtvvPBBgtVRD7S4BE0OIs,18992
7
+ qyro/cli/__init__.py,sha256=nJBgb1E_uizvL9QKAfaD2D9XG4pQyUuPWvoI-bMUq9o,114
8
+ qyro/cli/__main__.py,sha256=2DVoUPUuMB3itl7H538_13_E_4AhKqEYD9yRqBc4_6w,102
9
+ qyro/cli/cli.py,sha256=EhalJq2RQY0j-LHBto8jRAqju3SwPbpTnQyfv3zA4dA,14528
10
+ qyro/cli/interactive.py,sha256=-4Yeii1BZdCKg6oP0A8Q5b2tSdgj5vCYRdDdoLfBKn0,9901
11
+ qyro/common/__init__.py,sha256=CMKGX79QY5hFBD6IrDwp3wkRUCOj-QmVbfs4dCcXwZo,1020
12
+ qyro/common/animation.py,sha256=ZX4-Eap-yRnBZ_SObvdqsoP1hWFD88wPIp3s25D3MGA,2781
13
+ qyro/common/builder.py,sha256=smvsqebtuOx1TaFm2xaAudPirIiYws_5MAzganFRwnI,13464
14
+ qyro/common/compiler.py,sha256=54cR8PP67HQ7nHsIbqXzSkA4MuT_L4xK6kaqb-TApkk,38116
15
+ qyro/common/config.py,sha256=Dy69Eq2BTNMGRiKWnp6PsqQDt3zv6ImLY4qZkzsEUaA,3375
16
+ qyro/common/constants.py,sha256=UnbtCwWlXqWdsb4BuEbVDfMc1SfW_zIRqHzlAhG0LiY,3131
17
+ qyro/common/errors.py,sha256=1SrLVI0NnpuZ37zelBrkiKjY0PuXTyzH0YtrOW2qSZk,5119
18
+ qyro/common/frontend.py,sha256=n1B9JgqSiW3KV0P3UcnGIPBaX4Pd8Dwolsz2gA1N1Ls,2761
19
+ qyro/common/health.py,sha256=7L1NEU8lt3Ln5TMHLwdjourLnGhrkx7QlQOWWxQ_RsA,12144
20
+ qyro/common/kafka_manager.py,sha256=MJ0vakBdSbI8EVv_DbSLp-bx-UAOaPGCIZJkEIupngA,7504
21
+ qyro/common/logging.py,sha256=t3_zc01mCttdW0tKNkqAhy4x0L8lf8c-RxvBUkpQqhc,4699
22
+ qyro/common/memory.py,sha256=7DDmebORGn3Hvke94zQJS6U_laFv7MQkocIUVHhCcqY,5965
23
+ qyro/common/metrics.py,sha256=1OksXnPxS9vToO0cOme8uB8RNUgY8PhYowVFSrvxi34,11025
24
+ qyro/common/monitoring.py,sha256=6lIGCTWGwt4UrwyaMG49FLpKczqGuNNQMA8bOGLBtpE,16141
25
+ qyro/common/parser.py,sha256=pi7SlCoXDBkqDkfLzdfar4OpVQrlTZqQHRHUCL3OeRE,3168
26
+ qyro/common/platform.py,sha256=VjqynJu2AmycbsJmv0aO9rM4WkVN2Q8QVJCsWq7DYyY,19183
27
+ qyro/common/redis_memory.py,sha256=qwYEfo2fv_LXtPw5sODdTVNip0dcLIPFIJEqZxGkAiA,38397
28
+ qyro/common/rpc.py,sha256=0l7Q0YDhw260W2v-ys1tE70pc3KDUCuPQxjfHqS-9C0,9917
29
+ qyro/common/sandbox.py,sha256=P8-tywtNm7dNPqE0d5fXdKhcOhn52Ge7MTeOphxoHZA,6838
30
+ qyro/common/schema_loader.py,sha256=IDDpnL-P4CYeczE5-c-RrfFCylWyvQrHFQkHJhxSVv4,1263
31
+ qyro/common/secure_sandbox.py,sha256=ggaOdePUgPPp7istsymvwu6PEk_LwLGztfYYLwUWDgw,18722
32
+ qyro/common/toolchain_validator.py,sha256=TSNUv2l47yjCND32UBzf4-Pl-FYZn105Exl6VbqlFNI,22902
33
+ qyro/common/type_generator.py,sha256=b5DjlQxSKSs2-HeWK1cbTIlUYiSkKTijuGXL1Nczkbc,7047
34
+ qyro/common/validation.py,sha256=j-pdZInryDXWUJCsBTaHNGlRn9bIXjwnpT5HagxjIc4,13417
35
+ qyro/common/validator.py,sha256=zR8L_BXYxpALIqvce12HQJ_OsDhkjQlF51IfqCgXMno,6912
36
+ qyro/gateway/__init__.py,sha256=MmhpRayZ8gOCzVek0KRIFIr0pjSGekhK2Mi8J0Z909c,133
37
+ qyro/gateway/gateway.py,sha256=4-xZNiP7wTWdW4joKvqPgbFSLo3dEjC78uk5FfzNglI,12913
38
+ qyro/orchestrator/__init__.py,sha256=cl2Y6ufAXSKsLdg0jukkSVYbBWlwzOxbU39Rq7n3TIM,162
39
+ qyro/orchestrator/orchestrator.py,sha256=AUZd0nS0I4Gk3rCRk-WAJTw7g4T11nvgu6h4jSiegQU,53047
40
+ qyro-2.0.0.dist-info/licenses/LICENSE,sha256=5eUfC69_dRx7Ka3nXpe9QmoV63NyIIzJUnvdQ9EPb0E,1087
41
+ qyro-2.0.0.dist-info/METADATA,sha256=phJYQFN7JNf2b2uDmnAaoMX9ki8pyI7GRtY2SQ_M5xY,8121
42
+ qyro-2.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
43
+ qyro-2.0.0.dist-info/entry_points.txt,sha256=DmAkIsTkXLbzSRWXbpFnyggBJptkzrN2ECViCsDTiSA,43
44
+ qyro-2.0.0.dist-info/top_level.txt,sha256=mMa2JlYa-WRBVsXvpDHnjv5Rv1LKeTLB3ZGNwA5auJg,5
45
+ qyro-2.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.2)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ qyro = qyro.cli.cli:main
@@ -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.
@@ -0,0 +1 @@
1
+ qyro