This document provides a detailed reference for the Zenith API.
The Zenith.WApp
class is used to create a Zenith application.
Example:
app = Zenith.WApp()
serve()
: Starts the Zenith server.
Example:
app.serve()
The Zenith.Builder
class is used to create Zenith components.
Example:
builder = Zenith.Builder({"home": homePageContent})
Build()
: Builds the Zenith components.
Example:
built = builder.Build()
getRoutes()
: Returns the routes from the built components.
Example:
for route in builder.getRoutes():
app.register_route(f'{route}', built[route])
The Stylesheet
class is used to style Zenith components.
Example:
stylesheet = Stylesheet(builder, "HomePage", {
"id.header":
{
"foreColor": "#000",
"fontSize": 22
}
})
This is a brief overview of the Zenith API. For more detailed information, please refer to the official Zenith documentation.