Gramlot developer manual
Describe the interface in Python, keep application state in Data Bags, and let the browser runtime render and update components from Source.
This manual combines a teaching path, component reference, runnable examples and extension guidance. It describes the checked-out sources. Development-only features are marked in their chapters; the repository README states the released package version.
Choose your starting point
I want to… |
Start here |
|---|---|
Run my first page |
|
Understand Source, Data and bindings |
Writing pages, then Data binding |
Find a widget or parameter |
|
Try the examples |
|
Build a form, tabbed view or resizable layout |
|
Build menus, toolbars and editing windows |
|
Choose density, colors and field styling |
|
Add a custom collection or replace a component |
|
Call Python or load data lazily |
A small page
from gramlot import Page as GramlotPage
from gramlot.collections.inputs import mygramlot as inputs
class Page(GramlotPage):
gramlots = [inputs]
def main(self, root):
root.dataSetter("customer.name", "Ada")
root.textbox(value="^customer.name", lbl="Customer", live=True)
root.p("^customer.name", mask="Hello, {}")
The input and paragraph share the same Data path. Python declares the page; the runtime handles edits and updates without application code scraping the DOM. The host starts the page and supplies its selected collections. Follow the quickstart for installation and startup, and the collection guide for the prepared-package prerequisites.
What the examples provide
The example manual embeds Gramlot playgrounds, with full Python and JavaScript source next to the explanation. Python endpoints need a Python host; a static documentation site does not execute server code. The visual tour identifies the development chapters and shows their real gallery appearance.
Framework and host responsibilities
Gramlot owns Source, Data bindings, components and shared browser behavior. The Python host and JavaScript hosts own serving, process startup and deployment. Applications own domain logic, authorization and persistence. A Save command alone does not implement a database transaction.