Async client backed by the baked-in ``cmdop-core`` Go binary.
| 25 | ) -> None: |
| 26 | self._cfg = ClientConfig.resolve( |
| 27 | token=token, base_url=base_url, timeout_ms=timeout_ms |
| 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 |
| 53 | |
| 54 | async def __aexit__(self, *exc: Any) -> None: |
| 55 | await self.aclose() |
| 56 | |
| 57 | async def aclose(self) -> None: |
| 58 | await self._t.aclose() |
nothing calls this directly
no outgoing calls
no test coverage detected