MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / __init__

Method __init__

crates/pyhq/python/hyperqueue/client.py:55–72  ·  view source on GitHub ↗

A client serves as a gateway for submitting jobs and querying information about a running HyperQueue server. :param server_dir: Path to a server directory of a running HyperQueue server. :param python_env: Python environment which configures Python tasks created by

(
        self,
        server_dir: Optional[GenericPath] = None,
        python_env: Optional[PythonEnv] = None,
    )

Source from the content-addressed store, hash-verified

53
54class Client:
55 def __init__(
56 self,
57 server_dir: Optional[GenericPath] = None,
58 python_env: Optional[PythonEnv] = None,
59 ):
60 """
61 A client serves as a gateway for submitting jobs and querying information about a running
62 HyperQueue server.
63
64 :param server_dir: Path to a server directory of a running HyperQueue server.
65 :param python_env: Python environment which configures Python tasks created by
66 [`function`](`hyperqueue.job.Job.function`).
67 """
68 server_dir = str(server_dir) if server_dir else None
69 self.connection = ClientConnection(server_dir)
70 if python_env is None:
71 python_env = PythonEnv()
72 self.python_env = python_env
73
74 def submit(self, job: Job) -> SubmittedJob:
75 """

Callers

nothing calls this directly

Calls 2

ClientConnectionClass · 0.85
PythonEnvClass · 0.85

Tested by

no test coverage detected