ARKlight
A Python-first compiler for websites. Write pages as ordinary Python; ship plain HTML, CSS and a small fixed JavaScript runtime. The browser never runs Python.
pip install arklight
arklight build site.pyYou write
# include <stdlib.ARKlight>
site = Site()
@site.page("/")
def home():
return Page(
Heading("ARKlight"),
State("count", 0),
Text(Bind("count")),
Button("Increment", on_click=Action.increment("count", 1)),
title="Demo",
)You ship
A static folder you can serve from anything:
index.html, a stylesheet, one fixed
arklight.jsruntime, and an
sbom.txt.
The button above is wired to live reactive state, with no JavaScript written by hand.
Python needs to be 3.10 or newer, and only at build time.
What you get
Python in, static out
Describe pages as Python function calls. ARKlight validates them against a closed vocabulary, then compiles them to HTML, CSS and a fixed JS runtime.
OpenCompiler first, runtime last
Routing, validation, dependency resolution and CSS happen at build time. The browser runtime only handles what needs a browser: input, local storage, viewport, reactive state, URL state.
OpenA closed vocabulary
The compiler knows every component and behavior that can exist. No arbitrary JavaScript expressions are evaluated at runtime.
OpenComponents that compile away
User-defined components expand during compilation, so the abstraction does not survive into the generated site.
OpenPackage it your way
Pack a build into a single sealed `.ark` bundle, make it a PWA, or deploy it to Cloudflare Workers with `arklight deploy`.
OpenDiagnostics with a voice
Rei, the compiler narrator, can narrate a build in plain sentences with `--narrate`.
OpenOpen, inspectable repos
Both the compiler and this website are public on GitHub: read the source, file an issue, send a pull request.
OpenStart here
New to ARKlight? Go to
Getting started, then work through the
tutorial. Already building something? The
referenceand the
gotchaswill save you a few build cycles.
