Skip to content

Commit f1c7686

Browse files
authored
Enhance docstring for get_robot_part method (#1023)
1 parent 86549d3 commit f1c7686

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/viam/app/app_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1272,13 +1272,15 @@ async def get_robot_parts(self, robot_id: str) -> List[RobotPart]:
12721272
return [RobotPart.from_proto(robot_part=part) for part in response.parts]
12731273

12741274
async def get_robot_part(self, robot_part_id: str, dest: Optional[str] = None, indent: int = 4) -> RobotPart:
1275-
"""Get a machine part.
1275+
"""Get a machine part including its part config, part address, and other information.
12761276
12771277
::
12781278
12791279
my_robot_part = await cloud.get_robot_part(
12801280
robot_part_id="abc12345-1a23-1234-ab12-a22a22a2aa22"
12811281
)
1282+
# Get the part's config
1283+
machine_part_config = my_robot_part.robot_config
12821284
# Get the part's address
12831285
address = my_robot_part.fqdn
12841286
# Check if machine is live (last access time less than 10 sec ago)

0 commit comments

Comments
 (0)