def get_server(
    paths: Sequence[Path],
    host: str,
    port: int,
) -> ThreadingHTTPServer:
    """Returns an HTTP server that serves a local datasource.

    Args:
        paths:
            List of paths to serve.
        host:
            Host to serve the datasource on.
        port:
            Port to serve the datasource on.

    Examples:
        >>> from lightly.api import serve
        >>> from pathlib import Path
        >>> serve(
        >>>    paths=[Path("/input_mount), Path("/lightly_mount)],
        >>>    host="localhost",
        >>>    port=3456,
        >>> )

    """

    class _LocalDatasourceRequestHandler(SimpleHTTPRequestHandler):
        def translate_path(self, path: str) -> str:
            return _translate_path(path=path, directories=paths)

        def do_OPTIONS(self) -> None:
            self.send_response(204)
            self.send_header("Access-Control-Allow-Origin", "*")
            self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
            self.end_headers()

        def send_response_only(self, code: int, message: str | None = None) -> None:
            super().send_response_only(code, message)
            self.send_header(
                "Cache-Control", "no-store, must-revalidate, no-cache, max-age=-1"
            )
            self.send_header("Expires", "0")

    return ThreadingHTTPServer((host, port), _LocalDatasourceRequestHandler)
Returns an HTTP server that serves a local datasource.

    Args:
        paths:
            List of paths to serve.
        host:
            Host to serve the datasource on.
        port:
            Port to serve the datasource on.

    Examples:
        >>> from lightly.api import serve
        >>> from pathlib import Path
        >>> serve(
        >>>    paths=[Path("/input_mount), Path("/lightly_mount)],
        >>>    host="localhost",
        >>>    port=3456,
        >>> )

    
lightly/api/serve.py