The Universal Polyglot Runtime for SaaS
Build distributed systems in a single file. Qyro orchestrates Python, Rust, Java, Go, C++, and Node.js components using Docker, with shared state and event streaming built-in.
graph TD
User[Developer] -->|.qyro file| CLI[Qyro CLI]
CLI -->|Parses| Parser
Parser -->|Generates| Docker[Docker Compose]
subgraph "Runtime Environment (Docker Network)"
Redis[(Redis Shared State)]
Kafka[(Kafka Event Bus)]
S1[Python Service] <--> Redis
S1 <--> Kafka
S2[Rust Service] <--> Redis
S2 <--> Kafka
S3[Web Frontend] -->|API Calls| S1
S3 -->|API Calls| S2
end
Docker -->|Orchestrates| S1
Docker -->|Orchestrates| S2
Docker -->|Orchestrates| S3
- 📝 Single-File Logic: Define your entire stack (frontend, backend, workers) in one
.qyrofile. - 🌍 True Polyglot: First-class support for Python, Rust, Java, Go, C/C++, and Node.js.
- 🔗 Cross-Language RPC: Call functions across languages as if they were local.
# Python calling Rust result = qyro.call("rust-service.process_data", data)
- 💾 Distributed State: Built-in primitives for shared memory (
qyro.get/set) backed by Redis. - 📡 Event Streaming: Built-in Pub/Sub (
qyro.publish/subscribe) backed by Kafka. - 🔥 Hot Reload: Modify your
.qyrofile and see changes instantly withqyro run --watch. - ⚡ Production Ready: Multi-stage builds (
--prod), image caching, and circuit breakers. - 💻 Developer Experience: Beautiful CLI logs, VS Code extension, and automatic port management.
pip install qyroPrerequisites:
- Docker Desktop (Must be running)
- Python 3.9+
qyro init myapp
cd myapp>>>web:frontend [react, axios]
import React, { useEffect, useState } from 'react';
import { call } from './qyro_adapters/js_adapter';
export default function App() {
const [msg, setMsg] = useState("Loading...");
useEffect(() => {
// Call Python function from React
call("api.hello", "World").then(setMsg);
}, []);
return <h1>{msg}</h1>;
}
>>>python:api [fastapi]
from qyro_adapters.python_adapter import expose
@expose
def hello(name: str):
return f"Hello {name} from Python 🐍"qyro run myapp.qyro --watchQyro will compile your code into Docker containers, set up networking, start Redis/Kafka, and launch your app.
Qyro injects language-specific adapters into every container, giving you a unified API.
Header: >>>python:name [pip-packages]
from qyro_adapters.python_adapter import expose, call, get, set
@expose
def add(a: int, b: int) -> int:
return a + bHeader: >>>rust:name [crate-dependencies]
use qyro_adapters::Qyro;
Qyro::expose("add", |args| {
// ... implementation
});Header: >>>java:name [maven-dependencies]
import com.qyro.adapters.Qyro;
Qyro.expose("add", args -> {
return args.get(0) + args.get(1);
});Header: >>>go:name [go-modules]
import "qyro/adapters"
adapters.Expose("add", func(args []interface{}) interface{} {
return args[0].(int) + args[1].(int)
})Header: >>>web:name [npm-packages]
import { call } from './qyro_adapters/js_adapter';
await call("service.function", args);Watch for file changes and auto-restart services:
qyro run myapp.qyro --watchCreate optimized, multi-stage Docker images for deployment:
qyro build myapp.qyro --prodForce a rebuild without using cache:
qyro build --no-cacheFor the best experience, use the Qyro VS Code Extension.
- Navigate to
vscode_extension/in the repo. - Install dependencies:
npm install - Package:
vsce package - Install
.vsixin VS Code.
Features:
- Syntax highlighting for mixed languages embedded in
.qyro. - Snippets for quick service generation (
>>>python,>>>rust, etc.). - Intellisense for Qyro headers.
MIT © 2024 Qyro Team
Generated with ❤️ by Antigravity