MCPcopy Create free account
hub / github.com/Datakitpage/Datakit / open

Function open

cli-python/datakit_local/cli.py:95–102  ·  view source on GitHub ↗

Start DataKit server and open in browser

(port: Optional[int], host: str)

Source from the content-addressed store, hash-verified

93@click.option("--port", "-p", type=int, help="Port number")
94@click.option("--host", "-h", default="127.0.0.1", help="Host address")
95def open(port: Optional[int], host: str):
96 """Start DataKit server and open in browser"""
97 if port is None:
98 port = find_free_port()
99
100 from click.testing import CliRunner
101 runner = CliRunner()
102 runner.invoke(serve, ["--port", str(port), "--host", host])
103
104
105@main.command()

Callers 3

setup.pyFile · 0.50
get_versionFunction · 0.50
startServerFunction · 0.50

Calls 1

find_free_portFunction · 0.85

Tested by

no test coverage detected