MCPcopy Create free account
hub / github.com/commandoperator/cmdop-sdk / __init__

Method __init__

python/src/cmdop/client.py:30–49  ·  view source on GitHub ↗
(
        self,
        token: str | None = None,
        *,
        base_url: str | None = None,
        fleet_id: str | None = None,
        timeout_ms: int | None = None,
        binary_path: str | None = None,
        api_key: str | None = None,
        api_base_url: str | None = None,
    )

Source from the content-addressed store, hash-verified

28 )
29 self._t = Transport(self._cfg, binary_path or locate_binary())
30
31 @classmethod
32 def from_env(cls) -> Client:
33 return cls()
34
35 @property
36 def config(self) -> ClientConfig:
37 return self._cfg
38
39 @property
40 def base_url(self) -> str | None:
41 return self._cfg.base_url
42
43 @cached_property
44 def system(self) -> SystemResource:
45 return SystemResource(self)
46
47 @cached_property
48 def machines(self) -> MachinesResource:
49 return MachinesResource(self)
50
51 async def __aenter__(self) -> Client:
52 return self

Callers

nothing calls this directly

Calls 3

TransportClass · 0.90
locate_binaryFunction · 0.90
resolveMethod · 0.80

Tested by

no test coverage detected