PyReact-Web 🚀
Bahasa Web Fullstack Modern Bertenaga Python — v1.4.0
Bangun aplikasi fullstack bertenaga AI yang indah menggunakan satu bahasa, satu berkas, dan satu alur kerja terpadu.
PyReact = Kesederhanaan Python + Kekuatan React + Pengembangan AI-Native
📦 Instalasi & Memulai Cepat
PyReact kini tersedia secara resmi di PyPI dengan nama package pyreact-web:
# Instal PyReact secara global
pip install pyreact-web
# Buat proyek baru
pyreact new myapp
# Masuk ke direktori dan jalankan server pengembangan Flask + Vite
cd myapp
pyreact dev
Satu Berkas. Stack Utuh (Full Stack).
Berikut adalah contoh kode sederhana .pyreact yang menyatukan definisi database, logika backend RPC, rute halaman, gaya, komponen UI, hingga dukungan PWA offline dalam satu berkas tunggal:
database {
model Forecast {
id = primary_key()
value = integer()
created_at = timestamp()
}
}
server {
def forecast(data):
# Logika backend Python dengan akses database ORM & AI
return {"result": [1, 4, 9, 16]}
}
pages {
Home = "/"
Dashboard = "/dashboard" [guard]
Login = "/login"
}
component Dashboard():
result, setResult = use_state(None)
def runForecast():
data = server.forecast([])
setResult(data)
return (
<UI.Page>
<UI.Navbar title="Aplikasi PyReact" />
<UI.NetworkStatus />
<UI.Button onClick={runForecast}>Jalankan Forecast</UI.Button>
<UI.Chart type="line" data={result} />
</UI.Page>
)
style {
primary = "#6366f1"
radius = "16px"
background = "#0b0f19"
}
⚡ Fitur Utama (Fase 15 - 23 Selesai)
🩺 Self-Healing Compiler [Fase 15]
Mendeteksi kesalahan sintaksis secara otomatis saat kompilasi dan memperbaikinya secara dinamis menggunakan model AI lokal (via Ollama) atau cadangan cloud.
pyreact compile app.pyreact --heal
🗺️ File-System & Declarative Routing [Fase 16]
Mendukung routing deklaratif via blok pages { ... } serta routing berbasis struktur folder ala Next.js (contoh: pages/blog/[slug].pyreact) lengkap dengan otorisasi rute (route guards).
🛡️ Type System & Validasi [Fase 17]
Menjamin keamanan tipe data dengan anotasi tipe bawaan Python serta decorator seperti @validate untuk memvalidasi masukan kueri sebelum disimpan ke database.
🔄 Sinkronisasi Real-time [Fase 18]
Sinkronisasi data dua arah antara backend dan klien secara instan menggunakan jalur WebSocket atau Server-Sent Events (SSE).
🧪 Framework Pengujian Terintegrasi [Fase 19]
Lakukan pengujian unit komponen, pengujian API backend, hingga pengujian fungsional End-to-End (E2E) berbasis Playwright hanya dengan satu perintah:
pyreact test
💻 Ekstensi VS Code [Fase 20]
Peralatan editor lengkap mulai dari syntax highlighting berkas .pyreact, autocomplete berbasis LSP (Language Server Protocol), diagnosa eror inline, hingga panel live preview terintegrasi.
☁️ Deployment PyReact Cloud [Fase 21]
Unggah aplikasi produksi Anda ke klaster PyReact Cloud dengan satu baris perintah, lengkap dengan manajemen domain kustom, sertifikat SSL, dan dasbor analitik:
pyreact deploy
🌐 Hybrid Server-Side Rendering (SSR) [Fase 22]
Pre-rendering kode JSX frontend langsung dari sisi server Python (Flask/FastAPI) tanpa memerlukan runtime Node.js eksternal, dikombinasikan dengan hidrasi klien dinamis via ReactDOM.hydrateRoot.
📴 Offline-First PWA & Background Sync [Fase 23]
- Web App Manifest & Service Worker: Pembuatan otomatis
manifest.jsondansw.jsuntuk membuat aplikasi web dapat diinstal di HP/Desktop dan diakses tanpa koneksi internet. - Offline RPC Queue: Menyimpan panggilan fungsi
server.*saat perangkat luring (offline) ke dalam antrean, lalu memutarnya kembali secara otomatis saat terhubung kembali (online). - Local State Caching: Menyimpan status state komponen (
shared_state) secara otomatis ke LocalStorage. - Indikator Jaringan: Menampilkan status koneksi real-time melalui komponen bawaan
<UI.NetworkStatus />.
🗺️ Peta Jalan & Status Proyek (Roadmap)
| Fase | Fitur | Status |
|---|---|---|
| 1–14 | Lexer, Parser, AST, RPC, DB ORM, AI Agents, PPR Registry | ✅ Selesai |
| 15 | Self-Healing Compiler (Bertenaga AI) | ✅ Selesai |
| 16 | File-System & Pages Routing | ✅ Selesai |
| 17 | Type System & Validasi Request | ✅ Selesai |
| 18 | Real-Time Sync & Client WebSocket | ✅ Selesai |
| 19 | Framework Pengujian E2E (Playwright) | ✅ Selesai |
| 20 | Ekstensi VS Code (Sintaks, LSP, Live Preview) | ✅ Selesai |
| 21 | One-Command Cloud Deploy & Dasbor Analitik | ✅ Selesai |
| 22 | Hybrid Server-Side Rendering (SSR) | ✅ Selesai |
| 23 | Offline-First PWA & Background Sync | ✅ Selesai |
| 24 | Real-time Collaborative State & WebSockets | 🔲 Direncanakan |
| 25 | GraphQL API Engine & Type-Safe Queries | 🔲 Direncanakan |
| 26 | RBAC (Role-Based Access Control) & Guards | 🔲 Direncanakan |
📄 Lisensi
MIT © Yuda Hasibuan
Metadata
Release files for pyreact-web 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyreact_web-0.1.2.tar.gz | 116.2 kB | Without provenance | Details for pyreact_web-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyreact_web-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for pyreact_web-0.1.2-py3-none-any.whl |
Total release size: 222.1 kB
Release files / pyreact_web-0.1.2.tar.gz
| Download URL | pyreact_web-0.1.2.tar.gz |
|---|---|
| Size | 116.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07d8c87b856076b8587d3719208884d45cc18cec79af5a72be75c46b5c12e72e
|
|
BLAKE2b-256 checksum How to use checksums |
d9d6aca1c9978a2a851900ef2b01b56d599c5dfe14de12984a7ed27cc2246970
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / pyreact_web-0.1.2-py3-none-any.whl
| Download URL | pyreact_web-0.1.2-py3-none-any.whl |
|---|---|
| Size | 105.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
806ae1238ef0bc56f8c4dba0f8c440cbe880a4d7f9a01f4793f927c36e2b4066
|
|
BLAKE2b-256 checksum How to use checksums |
2aaf194318ef60f9d50fb1542abe9f19a777b420b54b9029d80a06f9913156b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for pyreact-web 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.