Coverage for abb_rws_client_python_rw6/rws/root.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-08-13 22:17 +0000

1# This file is AUTO-GENERATED by utils/generator/main.py 

2# DO NOT EDIT MANUALLY — run the generator to regenerate. 

3# Generator author: Clement RACINET 

4""" 

5RWS module: Root Resource → Get Service list 

6 

71:1 mirror of the ABB RobotWare 6 REST API. 

8Each function maps to exactly one HTTP endpoint. 

9No composed logic — see highlevel/ for wrappers. 

10""" 

11 

12from __future__ import annotations 

13 

14import httpx 

15 

16from abb_rws_client_python_rw6.core.client import RWSClient 

17 

18 

19async def get_service_list(client: RWSClient) -> httpx.Response: 

20 """ 

21 Get Service list. 

22 

23 Route: ``GET /`` 

24 ABB constraints: Supported in bootserver mode 

25 

26 Args: 

27 client: Open RWSClient instance. 

28 

29 Returns: 

30 Raw HTTP response. Expected success: HTTP 200. 

31 

32 Raises: 

33 RWSAuthenticationError: On HTTP 401. 

34 RWSNotFoundError: On HTTP 404. 

35 RWSHTTPError: On any other HTTP >= 400. 

36 # ABB codes: BAD_REQUEST(400) 

37 

38 Example: 

39 ```python 

40 >>> await get_service_list(client) 

41 <Response [200]> 

42 ``` 

43 """ 

44 return await client.get("/") 

45 

46 

47async def logout(client: RWSClient) -> httpx.Response: 

48 """ 

49 Logout. 

50 

51 Route: ``GET /logout`` 

52 ABB constraints: Supported in bootserver mode 

53 

54 Args: 

55 client: Open RWSClient instance. 

56 

57 Returns: 

58 Raw HTTP response. Expected success: HTTP 204. 

59 

60 Raises: 

61 RWSAuthenticationError: On HTTP 401. 

62 RWSNotFoundError: On HTTP 404. 

63 RWSHTTPError: On any other HTTP >= 400. 

64 # ABB codes: BAD_REQUEST(400) 

65 

66 Example: 

67 ```python 

68 >>> await logout(client) 

69 <Response [204]> 

70 ``` 

71 """ 

72 return await client.get("/logout")