mdvtools.serverlite#
Lightweight Flask server for serving MDV project data and metadata.
This module provides a minimal Flask application that exposes endpoints for serving project data, images, configurations, and handling file operations with support for HTTP range requests and security headers.
Attributes#
Functions#
|
Create and configure a Flask application for serving MDV project data. |
|
Serve an MDV project using a lightweight Flask server. |
Module Contents#
- mdvtools.serverlite.create_app(project: mdvtools.mdvproject.MDVProject)[source]#
Create and configure a Flask application for serving MDV project data.
- Parameters:
project (MDVProject) – The MDV project instance to serve
- Returns:
Configured Flask application
- Return type:
Flask
- mdvtools.serverlite.serve_project(project: mdvtools.mdvproject.MDVProject | str, port: int = 5050, open_browser: bool = True)[source]#
Serve an MDV project using a lightweight Flask server. :param project: The MDV project instance or path to the project directory. :type project: MDVProject | str :param port: The port to run the server on. Defaults to 5050. :type port: int :param open_browser: Whether to open the browser automatically. Defaults to True. :type open_browser: bool