MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / WebCommand

Class WebCommand

misc/python/materialize/cli/mzcompose.py:631–643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629
630
631class WebCommand(Command):
632 name = "web"
633 help = "open a service's URL in a web browser"
634
635 def configure(self, parser: argparse.ArgumentParser) -> None:
636 parser.add_argument("service", metavar="SERVICE", help="the service to target")
637
638 def run(self, args: argparse.Namespace) -> None:
639 composition = load_composition(args)
640 port = composition.default_port(args.service)
641 url = f"http://localhost:{port}"
642 print(f"Opening {url} in a web browser...")
643 webbrowser.open(url)
644
645
646class DockerComposeCommand(Command):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected