Appearance
Understanding Application Structure
Equation applications are configured through EquationWebClientSettings and one or more EquationWebClientTabSettings entries.
Overview
An Equation app configuration has:
- Application settings (
EquationWebClientSettings): app-level name, route, and tab collection - Tab settings (
EquationWebClientTabSettings): per-tab layout, trigger behavior, and endpoint wiring
Application Settings
python
from haskoning_equation import EquationWebClientSettings, EquationWebClientTabSettings
settings = EquationWebClientSettings(
app_name="Nereda Process Calculations",
route="/nereda",
tabs=[
EquationWebClientTabSettings(
tab_name="Process Design",
tab_icon="mdi-calculator",
trigger_type="automatic",
layout_type="split",
core_endpoints=["/calculate", "/validate"],
)
],
)Key EquationWebClientSettings Properties
app_name: Display name of the applicationroute: Route where the app is mounted (useful for multiple apps)tabs: List ofEquationWebClientTabSettings; if omitted, Equation creates a default tab
Tab Configuration
EquationWebClientTabSettings controls tab behavior and UI composition.
python
from haskoning_equation import EquationWebClientTabSettings
tab = EquationWebClientTabSettings(
tab_name="Results",
tab_icon="mdi-chart-line",
trigger_type="manual",
layout_type="combined",
on_mount_endpoints=["/load_results"],
core_endpoints=["/calculate"],
unit_conversion_endpoint="/convert_units",
)Key EquationWebClientTabSettings Properties
tab_name: Tab label in the UItab_icon: Optional icon identifiertrigger_type:"manual"or"automatic"layout_type:"stacked","combined","split", or"parametric"core_endpoints: Endpoints used by the tabon_mount_endpoints/on_unmount_endpoints: Lifecycle endpoints; functions that run only once when opening or closing the tab.unit_conversion_endpoint: Endpoint for unit conversionsreceive_speckle_endpoint/send_speckle_endpoint: Speckle integration endpointsshape_diver_ticket: ShapeDiver ticketinclude_schema_in_selection_tree: Include schema nodes in selection treedisabled/hidden: Tab visibility and availability flags
Multiple Apps in One FastAPI Service
python
from fastapi import FastAPI
from haskoning_equation import apply_equation_web_client_settings, EquationWebClientSettings
app = FastAPI()
settings_app1 = EquationWebClientSettings(app_name="Nereda", route="/nereda")
settings_app2 = EquationWebClientSettings(app_name="Hycalc", route="/hycalc")
apply_equation_web_client_settings(app, [settings_app1, settings_app2])Best Practices
- Pick
layout_typebased on user workflow, not implementation convenience. - Use
automatictrigger for lightweight calculations andmanualfor expensive runs. - Keep endpoint responsibilities clear (
core, lifecycle, unit conversion, integrations). - Use
routeexplicitly when hosting multiple apps.
Next Steps
- Learn about choosing layouts
- Explore UI styling
- Review endpoint generation