pipeworks_mud_mapper.app ======================== .. py:module:: pipeworks_mud_mapper.app .. autoapi-nested-parse:: Main Dash application for the PipeWorks MUD Mapper. This module provides the web-based zone editor application entry point. The application is built using Dash and Plotly for interactive visualization and editing of MUD zone files. Architecture ------------ The application follows a modular architecture: - **layout/**: UI structure (Dash components) - **callbacks/**: Interactivity (Dash callbacks) - **services/**: Business logic (pure Python) - **models/**: Domain models (Pydantic) - **components/**: Reusable Plotly/Dash components - **utils/**: File I/O and utilities Application Flow ---------------- 1. App initializes with Bootstrap theme 2. Layout is created from layout/ modules 3. Callbacks are registered from callbacks/ modules 4. run_app() starts the development server Usage ----- Run the application from command line:: python -m pipeworks_mud_mapper Or import and run programmatically:: from pipeworks_mud_mapper.app import run_app run_app(debug=True, port=8050) Access the application at http://127.0.0.1:8050 in your browser. .. seealso:: :py:obj:`-`, :py:obj:`-`, :py:obj:`-`, :py:obj:`-` Attributes ---------- .. autoapisummary:: pipeworks_mud_mapper.app.app Functions --------- .. autoapisummary:: pipeworks_mud_mapper.app.run_app Module Contents --------------- .. py:data:: app The main Dash application instance. Configured with: - Bootstrap theme for consistent styling - Custom title shown in browser tab - Serves the Flask app on run() .. py:function:: run_app(debug = True, port = None) Run the Dash application. Starts the Flask development server and opens the mapper application in the browser. :param debug: Enable debug mode with auto-reload (default: True). Set to False for production deployments. :type debug: :py:class:`bool`, *optional* :param port: Port to run the server on. When omitted, uses config/server.ini (or the default 8050 when not configured). :type port: :py:class:`int | None`, *optional* .. admonition:: Examples Run with defaults:: >>> from pipeworks_mud_mapper.app import run_app >>> run_app() Run on different port:: >>> run_app(debug=False, port=8080) .. admonition:: Notes - In debug mode, the server auto-reloads on code changes - Access the application at http://127.0.0.1:{port} - Ctrl+C to stop the server