Syqlorix: Build Hyper-Minimal Web Pages in Pure Python
English | Filipino | Cebuano | 简体中文 | 한국어 | Español | Français | Deutsch | 日本語 | Português | Русский
Overview
Syqlorix is a high-performance, hyper-minimalist hybrid web framework for Python. It combines a pure Python DSL with a Rust-powered core for maximum speed, secure Starlark-based components, and an optional distributed Scala backend, complete with live-reloading and static site generation.
It is designed for developers who want to build full HTML documents—including CSS and JavaScript—entirely within Python, while enjoying the execution speeds of a compiled backend.
Core Design Principles
- All-in-One: Write entire pages and components in
.pyfiles. - Component-Based: Structure your UI with reusable, stateful components.
- High Performance: Native Rust core for critical hot-paths (v1.4+).
- Zero-Config: Sensible defaults for instant productivity.
Key Features
- Pure Python HTML: Generate any HTML element using Python objects.
- Rust-Powered Performance: Blazing fast ID generation and Tailwind CSS processing (up to 15x speedup).
- Secure Starlark Components: Define UI logic in a deterministic, 100% sandboxed environment.
- Distributed Scalability: Optional support for high-concurrency Scala backends via Apache Thrift.
- Component-Based Architecture: Build your UI with reusable components that support props, children, scoped CSS, and lifecycle methods.
- State Management: Create interactive components with a simple, server-side state management pattern.
- Live Reload Server: The dev server automatically reloads your browser on code changes.
- Static Site Generation (SSG): Build your entire application into a high-performance static website.
- Dynamic Routing: Create clean routes with variable paths (e.g.,
/user/<username>).
Quick Start
-
Install Syqlorix:
pip install syqlorix
-
Create a file
app.py:from syqlorix import * doc = Syqlorix() @doc.route('/') def home(request): return Syqlorix( head(title("Hello")), body( h1("Hello from Syqlorix!"), p("This is a web page generated entirely from Python.") ) )
-
Run the development server:
syqlorix run app.py
-
Open your browser to
http://127.0.0.1:8000. That's it!
› Click to view Usage Guide
Component-Based Architecture
Syqlorix features a powerful component-based architecture. Components are reusable, stateful, and can have their own scoped styles.
# components.py
from syqlorix import Component, div, h1, p, style
class Card(Component):
def before_render(self):
# Lifecycle method: runs before create()
self.title = self.props.get("title", "Default Title").upper()
def create(self, children=None):
# Scoped styles using the component's unique scope_attr (Rust-powered)
scoped_style = f"div[{self.scope_attr}] h1 {{ color: blue; }}"
return div(
style(scoped_style),
h1(self.title),
*(children or [])
)
Secure Starlark Components
Use Starlark for deterministic and sandboxed component definitions, ideal for user-generated layouts.
from syqlorix import StarlarkComponent
starlark_ui = """
tag("div",
tag("h1", props["title"]),
tag("p", "Rendered securely via Starlark."),
class_="container"
)
"""
comp = StarlarkComponent(script_content=starlark_ui, title="Secure UI")
High-Concurrency Backend (Optional)
Delegate rendering to an external Scala backend via Thrift for massive horizontal scaling.
doc = Syqlorix()
# Enable high-performance Scala backend
doc.use_backend(host="127.0.0.1", port=9090)
State Management
class Counter(Component):
def __init__(self, *children, **props):
super().__init__(*children, **props)
try:
count = int(self.props.get("initial_count", 0))
except ValueError:
count = 0
self.set_state({"count": count})
def create(self, children=None):
count = self.state.get("count", 0)
return div(
h1(count),
form(
button("-", name="count", value=count - 1),
button("+", name="count", value=count + 1),
method="get", action="/"
)
)
› Click to view Command-Line Interface (CLI)
Target Use Cases
- Fast Prototyping: Quickly mock up web interfaces without juggling multiple files.
- High-Performance Static Sites: Optimized build times using the Rust core.
- Secure Dashboards: Sandboxed component execution via Starlark.
- Distributed Systems: Web frontends that scale using the Scala backend.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for syqlorix 1.4.7
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 |
|---|---|---|---|---|
| syqlorix-1.4.7.tar.gz | 39.4 kB | Without provenance | Details for syqlorix-1.4.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| syqlorix-1.4.7-cp312-cp312-manylinux_2_34_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.34+ x86-64 | Details for syqlorix-1.4.7-cp312-cp312-manylinux_2_34_x86_64.whl |
Total release size: 1.4 MB
Release files / syqlorix-1.4.7.tar.gz
| Download URL | syqlorix-1.4.7.tar.gz |
|---|---|
| Size | 39.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38c84e9a7a603074a8a106cb7105d88443927751f7d207d9c933294e366b6ab6
|
|
BLAKE2b-256 checksum How to use checksums |
9ba942de3774bae9b244f8f68735b6b9fe5097f7b28e2df00fdf21cbc1e98a6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / syqlorix-1.4.7-cp312-cp312-manylinux_2_34_x86_64.whl
| Download URL | syqlorix-1.4.7-cp312-cp312-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.12 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
33e6d40c2fb855c8b268724e3e6c3be65b92f118c7d7312392e24dde0cfe9f88
|
|
BLAKE2b-256 checksum How to use checksums |
a4db5d81637a31c41840c33968d578dfbc7e8f38ad8575d9c00b03dfe7dfdd6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Security for syqlorix 1.4.7
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.