tower 0.3.4__py3-none-linux_armv6l.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. tower/__init__.py +4 -0
  2. tower/__main__.py +38 -0
  3. tower/client.py +115 -0
  4. tower/tower_api_client/__init__.py +7 -0
  5. tower/tower_api_client/api/__init__.py +1 -0
  6. tower/tower_api_client/api/default/__init__.py +0 -0
  7. tower/tower_api_client/api/default/accept_invitation.py +150 -0
  8. tower/tower_api_client/api/default/cancel_run.py +159 -0
  9. tower/tower_api_client/api/default/claim_device_login_ticket.py +154 -0
  10. tower/tower_api_client/api/default/create_account.py +150 -0
  11. tower/tower_api_client/api/default/create_api_key.py +142 -0
  12. tower/tower_api_client/api/default/create_apps.py +150 -0
  13. tower/tower_api_client/api/default/create_device_login_ticket.py +131 -0
  14. tower/tower_api_client/api/default/create_secret.py +150 -0
  15. tower/tower_api_client/api/default/create_session.py +150 -0
  16. tower/tower_api_client/api/default/create_team.py +150 -0
  17. tower/tower_api_client/api/default/delete_api_key.py +142 -0
  18. tower/tower_api_client/api/default/delete_app.py +146 -0
  19. tower/tower_api_client/api/default/delete_secret.py +104 -0
  20. tower/tower_api_client/api/default/delete_team.py +150 -0
  21. tower/tower_api_client/api/default/delete_team_invitation.py +167 -0
  22. tower/tower_api_client/api/default/deploy_app.py +166 -0
  23. tower/tower_api_client/api/default/describe_app.py +165 -0
  24. tower/tower_api_client/api/default/describe_app_version.py +163 -0
  25. tower/tower_api_client/api/default/describe_device_login_session.py +154 -0
  26. tower/tower_api_client/api/default/describe_run.py +172 -0
  27. tower/tower_api_client/api/default/describe_secrets_key.py +160 -0
  28. tower/tower_api_client/api/default/describe_session.py +125 -0
  29. tower/tower_api_client/api/default/export_secrets.py +218 -0
  30. tower/tower_api_client/api/default/generate_app_statistics.py +129 -0
  31. tower/tower_api_client/api/default/generate_run_statistics.py +160 -0
  32. tower/tower_api_client/api/default/get_app_run_logs.py +159 -0
  33. tower/tower_api_client/api/default/invite_team_member.py +163 -0
  34. tower/tower_api_client/api/default/leave_team.py +150 -0
  35. tower/tower_api_client/api/default/list_api_keys.py +125 -0
  36. tower/tower_api_client/api/default/list_app_environments.py +150 -0
  37. tower/tower_api_client/api/default/list_app_versions.py +146 -0
  38. tower/tower_api_client/api/default/list_apps.py +247 -0
  39. tower/tower_api_client/api/default/list_my_team_invitations.py +129 -0
  40. tower/tower_api_client/api/default/list_runs.py +184 -0
  41. tower/tower_api_client/api/default/list_secret_environments.py +129 -0
  42. tower/tower_api_client/api/default/list_secrets.py +201 -0
  43. tower/tower_api_client/api/default/list_team_invitations.py +150 -0
  44. tower/tower_api_client/api/default/list_team_members.py +146 -0
  45. tower/tower_api_client/api/default/list_teams.py +125 -0
  46. tower/tower_api_client/api/default/refresh_session.py +129 -0
  47. tower/tower_api_client/api/default/remove_team_member.py +163 -0
  48. tower/tower_api_client/api/default/resend_team_invitation.py +167 -0
  49. tower/tower_api_client/api/default/run_app.py +176 -0
  50. tower/tower_api_client/api/default/stream_app_run_logs.py +100 -0
  51. tower/tower_api_client/api/default/update_account_slug.py +163 -0
  52. tower/tower_api_client/api/default/update_my_team_invitation.py +154 -0
  53. tower/tower_api_client/api/default/update_team.py +167 -0
  54. tower/tower_api_client/api/default/update_user.py +150 -0
  55. tower/tower_api_client/client.py +51 -0
  56. tower/tower_api_client/models/__init__.py +193 -0
  57. tower/tower_api_client/models/accept_invitation_params.py +49 -0
  58. tower/tower_api_client/models/accept_invitation_response.py +56 -0
  59. tower/tower_api_client/models/account.py +45 -0
  60. tower/tower_api_client/models/api_key.py +67 -0
  61. tower/tower_api_client/models/app.py +122 -0
  62. tower/tower_api_client/models/app_statistics.py +66 -0
  63. tower/tower_api_client/models/app_summary.py +81 -0
  64. tower/tower_api_client/models/app_version.py +71 -0
  65. tower/tower_api_client/models/cancel_run_response.py +56 -0
  66. tower/tower_api_client/models/claim_device_login_ticket_params.py +49 -0
  67. tower/tower_api_client/models/claim_device_login_ticket_response.py +49 -0
  68. tower/tower_api_client/models/create_account_params.py +91 -0
  69. tower/tower_api_client/models/create_account_params_flags_struct.py +38 -0
  70. tower/tower_api_client/models/create_account_response.py +56 -0
  71. tower/tower_api_client/models/create_api_key_params.py +49 -0
  72. tower/tower_api_client/models/create_api_key_response.py +56 -0
  73. tower/tower_api_client/models/create_app_params.py +57 -0
  74. tower/tower_api_client/models/create_app_response.py +56 -0
  75. tower/tower_api_client/models/create_device_login_ticket_response.py +94 -0
  76. tower/tower_api_client/models/create_secret_params.py +70 -0
  77. tower/tower_api_client/models/create_secret_response.py +56 -0
  78. tower/tower_api_client/models/create_session_params.py +56 -0
  79. tower/tower_api_client/models/create_session_response.py +56 -0
  80. tower/tower_api_client/models/create_team_params.py +56 -0
  81. tower/tower_api_client/models/create_team_response.py +56 -0
  82. tower/tower_api_client/models/delete_api_key_params.py +49 -0
  83. tower/tower_api_client/models/delete_api_key_response.py +56 -0
  84. tower/tower_api_client/models/delete_app_response.py +56 -0
  85. tower/tower_api_client/models/delete_team_invitation_params.py +49 -0
  86. tower/tower_api_client/models/delete_team_invitation_response.py +56 -0
  87. tower/tower_api_client/models/delete_team_params.py +49 -0
  88. tower/tower_api_client/models/delete_team_response.py +56 -0
  89. tower/tower_api_client/models/deploy_app_response.py +56 -0
  90. tower/tower_api_client/models/describe_app_response.py +75 -0
  91. tower/tower_api_client/models/describe_app_version_response.py +56 -0
  92. tower/tower_api_client/models/describe_device_login_session_response.py +56 -0
  93. tower/tower_api_client/models/describe_run_response.py +56 -0
  94. tower/tower_api_client/models/describe_secrets_key_response.py +49 -0
  95. tower/tower_api_client/models/describe_session_response.py +56 -0
  96. tower/tower_api_client/models/error_detail.py +54 -0
  97. tower/tower_api_client/models/error_model.py +109 -0
  98. tower/tower_api_client/models/export_secrets_response.py +75 -0
  99. tower/tower_api_client/models/export_user_secrets_params.py +49 -0
  100. tower/tower_api_client/models/exported_secret.py +62 -0
  101. tower/tower_api_client/models/generate_app_statistics_response.py +56 -0
  102. tower/tower_api_client/models/generate_run_statistics_response.py +85 -0
  103. tower/tower_api_client/models/get_run_log_line.py +47 -0
  104. tower/tower_api_client/models/get_run_logs_output_body.py +65 -0
  105. tower/tower_api_client/models/invite_team_member_params.py +58 -0
  106. tower/tower_api_client/models/invite_team_member_response.py +65 -0
  107. tower/tower_api_client/models/leave_team_response.py +56 -0
  108. tower/tower_api_client/models/list_api_keys_response.py +65 -0
  109. tower/tower_api_client/models/list_app_environments_response.py +50 -0
  110. tower/tower_api_client/models/list_app_versions_response.py +65 -0
  111. tower/tower_api_client/models/list_apps_response.py +75 -0
  112. tower/tower_api_client/models/list_apps_status_item.py +11 -0
  113. tower/tower_api_client/models/list_my_team_invitations_response.py +65 -0
  114. tower/tower_api_client/models/list_runs_response.py +75 -0
  115. tower/tower_api_client/models/list_secret_environments_response.py +50 -0
  116. tower/tower_api_client/models/list_secrets_response.py +75 -0
  117. tower/tower_api_client/models/list_team_invitations_response.py +65 -0
  118. tower/tower_api_client/models/list_team_members_response.py +65 -0
  119. tower/tower_api_client/models/list_teams_response.py +65 -0
  120. tower/tower_api_client/models/log_line.py +62 -0
  121. tower/tower_api_client/models/log_line_error.py +47 -0
  122. tower/tower_api_client/models/pagination.py +59 -0
  123. tower/tower_api_client/models/parameter.py +52 -0
  124. tower/tower_api_client/models/refresh_session_response.py +66 -0
  125. tower/tower_api_client/models/remove_team_member_params.py +49 -0
  126. tower/tower_api_client/models/remove_team_member_response.py +56 -0
  127. tower/tower_api_client/models/resend_team_invitation_params.py +57 -0
  128. tower/tower_api_client/models/resend_team_invitation_response.py +56 -0
  129. tower/tower_api_client/models/run.py +129 -0
  130. tower/tower_api_client/models/run_app_params.py +72 -0
  131. tower/tower_api_client/models/run_app_params_parameters.py +43 -0
  132. tower/tower_api_client/models/run_app_response.py +56 -0
  133. tower/tower_api_client/models/run_results.py +73 -0
  134. tower/tower_api_client/models/run_statistics.py +52 -0
  135. tower/tower_api_client/models/secret.py +62 -0
  136. tower/tower_api_client/models/series_point.py +52 -0
  137. tower/tower_api_client/models/session.py +73 -0
  138. tower/tower_api_client/models/statistics_settings.py +38 -0
  139. tower/tower_api_client/models/team.py +75 -0
  140. tower/tower_api_client/models/team_invitation.py +61 -0
  141. tower/tower_api_client/models/token.py +38 -0
  142. tower/tower_api_client/models/update_account_slug_params.py +49 -0
  143. tower/tower_api_client/models/update_account_slug_response.py +56 -0
  144. tower/tower_api_client/models/update_my_team_invitation_params.py +56 -0
  145. tower/tower_api_client/models/update_my_team_invitation_response.py +39 -0
  146. tower/tower_api_client/models/update_team_params.py +58 -0
  147. tower/tower_api_client/models/update_team_response.py +56 -0
  148. tower/tower_api_client/models/update_user_params.py +71 -0
  149. tower/tower_api_client/models/update_user_response.py +56 -0
  150. tower/tower_api_client/models/user.py +90 -0
  151. tower/tower_api_client/types.py +44 -0
  152. tower-0.3.4.data/scripts/tower +0 -0
  153. tower-0.3.4.dist-info/METADATA +115 -0
  154. tower-0.3.4.dist-info/RECORD +156 -0
  155. tower-0.3.4.dist-info/WHEEL +4 -0
  156. tower-0.3.4.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,154 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional
3
+
4
+ import httpx
5
+
6
+ from ...client import AuthenticatedClient
7
+ from ...models.update_my_team_invitation_params import UpdateMyTeamInvitationParams
8
+ from ...models.update_my_team_invitation_response import UpdateMyTeamInvitationResponse
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ *,
14
+ client: AuthenticatedClient,
15
+ json_body: UpdateMyTeamInvitationParams,
16
+ ) -> Dict[str, Any]:
17
+ url = "{}/team-invites".format(client.base_url)
18
+
19
+ headers: Dict[str, str] = client.get_headers()
20
+ cookies: Dict[str, Any] = client.get_cookies()
21
+
22
+ json_json_body = json_body.to_dict()
23
+
24
+ return {
25
+ "method": "put",
26
+ "url": url,
27
+ "headers": headers,
28
+ "cookies": cookies,
29
+ "timeout": client.get_timeout(),
30
+ "json": json_json_body,
31
+ }
32
+
33
+
34
+ def _parse_response(
35
+ *, response: httpx.Response
36
+ ) -> Optional[UpdateMyTeamInvitationResponse]:
37
+ if response.status_code == 200:
38
+ response_200 = UpdateMyTeamInvitationResponse.from_dict(response.json())
39
+
40
+ return response_200
41
+ return None
42
+
43
+
44
+ def _build_response(
45
+ *, response: httpx.Response
46
+ ) -> Response[UpdateMyTeamInvitationResponse]:
47
+ return Response(
48
+ status_code=HTTPStatus(response.status_code),
49
+ content=response.content,
50
+ headers=response.headers,
51
+ parsed=_parse_response(response=response),
52
+ )
53
+
54
+
55
+ def sync_detailed(
56
+ *,
57
+ client: AuthenticatedClient,
58
+ json_body: UpdateMyTeamInvitationParams,
59
+ ) -> Response[UpdateMyTeamInvitationResponse]:
60
+ """Update My Team Invitation
61
+
62
+ Update a team invitation that you have pending
63
+
64
+ Args:
65
+ json_body (UpdateMyTeamInvitationParams):
66
+
67
+ Returns:
68
+ Response[UpdateMyTeamInvitationResponse]
69
+ """
70
+
71
+ kwargs = _get_kwargs(
72
+ client=client,
73
+ json_body=json_body,
74
+ )
75
+
76
+ response = httpx.request(
77
+ verify=client.verify_ssl,
78
+ **kwargs,
79
+ )
80
+
81
+ return _build_response(response=response)
82
+
83
+
84
+ def sync(
85
+ *,
86
+ client: AuthenticatedClient,
87
+ json_body: UpdateMyTeamInvitationParams,
88
+ ) -> Optional[UpdateMyTeamInvitationResponse]:
89
+ """Update My Team Invitation
90
+
91
+ Update a team invitation that you have pending
92
+
93
+ Args:
94
+ json_body (UpdateMyTeamInvitationParams):
95
+
96
+ Returns:
97
+ Response[UpdateMyTeamInvitationResponse]
98
+ """
99
+
100
+ return sync_detailed(
101
+ client=client,
102
+ json_body=json_body,
103
+ ).parsed
104
+
105
+
106
+ async def asyncio_detailed(
107
+ *,
108
+ client: AuthenticatedClient,
109
+ json_body: UpdateMyTeamInvitationParams,
110
+ ) -> Response[UpdateMyTeamInvitationResponse]:
111
+ """Update My Team Invitation
112
+
113
+ Update a team invitation that you have pending
114
+
115
+ Args:
116
+ json_body (UpdateMyTeamInvitationParams):
117
+
118
+ Returns:
119
+ Response[UpdateMyTeamInvitationResponse]
120
+ """
121
+
122
+ kwargs = _get_kwargs(
123
+ client=client,
124
+ json_body=json_body,
125
+ )
126
+
127
+ async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
128
+ response = await _client.request(**kwargs)
129
+
130
+ return _build_response(response=response)
131
+
132
+
133
+ async def asyncio(
134
+ *,
135
+ client: AuthenticatedClient,
136
+ json_body: UpdateMyTeamInvitationParams,
137
+ ) -> Optional[UpdateMyTeamInvitationResponse]:
138
+ """Update My Team Invitation
139
+
140
+ Update a team invitation that you have pending
141
+
142
+ Args:
143
+ json_body (UpdateMyTeamInvitationParams):
144
+
145
+ Returns:
146
+ Response[UpdateMyTeamInvitationResponse]
147
+ """
148
+
149
+ return (
150
+ await asyncio_detailed(
151
+ client=client,
152
+ json_body=json_body,
153
+ )
154
+ ).parsed
@@ -0,0 +1,167 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional
3
+
4
+ import httpx
5
+
6
+ from ...client import AuthenticatedClient
7
+ from ...models.update_team_params import UpdateTeamParams
8
+ from ...models.update_team_response import UpdateTeamResponse
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ slug: str,
14
+ *,
15
+ client: AuthenticatedClient,
16
+ json_body: UpdateTeamParams,
17
+ ) -> Dict[str, Any]:
18
+ url = "{}/teams/{slug}".format(client.base_url, slug=slug)
19
+
20
+ headers: Dict[str, str] = client.get_headers()
21
+ cookies: Dict[str, Any] = client.get_cookies()
22
+
23
+ json_json_body = json_body.to_dict()
24
+
25
+ return {
26
+ "method": "put",
27
+ "url": url,
28
+ "headers": headers,
29
+ "cookies": cookies,
30
+ "timeout": client.get_timeout(),
31
+ "json": json_json_body,
32
+ }
33
+
34
+
35
+ def _parse_response(*, response: httpx.Response) -> Optional[UpdateTeamResponse]:
36
+ if response.status_code == 200:
37
+ response_200 = UpdateTeamResponse.from_dict(response.json())
38
+
39
+ return response_200
40
+ return None
41
+
42
+
43
+ def _build_response(*, response: httpx.Response) -> Response[UpdateTeamResponse]:
44
+ return Response(
45
+ status_code=HTTPStatus(response.status_code),
46
+ content=response.content,
47
+ headers=response.headers,
48
+ parsed=_parse_response(response=response),
49
+ )
50
+
51
+
52
+ def sync_detailed(
53
+ slug: str,
54
+ *,
55
+ client: AuthenticatedClient,
56
+ json_body: UpdateTeamParams,
57
+ ) -> Response[UpdateTeamResponse]:
58
+ """Update Team
59
+
60
+ Update a team with a new name or slug. Note that updating the team with a new slug will cause all
61
+ your URLs to change!
62
+
63
+ Args:
64
+ slug (str): The slug of the team to update
65
+ json_body (UpdateTeamParams):
66
+
67
+ Returns:
68
+ Response[UpdateTeamResponse]
69
+ """
70
+
71
+ kwargs = _get_kwargs(
72
+ slug=slug,
73
+ client=client,
74
+ json_body=json_body,
75
+ )
76
+
77
+ response = httpx.request(
78
+ verify=client.verify_ssl,
79
+ **kwargs,
80
+ )
81
+
82
+ return _build_response(response=response)
83
+
84
+
85
+ def sync(
86
+ slug: str,
87
+ *,
88
+ client: AuthenticatedClient,
89
+ json_body: UpdateTeamParams,
90
+ ) -> Optional[UpdateTeamResponse]:
91
+ """Update Team
92
+
93
+ Update a team with a new name or slug. Note that updating the team with a new slug will cause all
94
+ your URLs to change!
95
+
96
+ Args:
97
+ slug (str): The slug of the team to update
98
+ json_body (UpdateTeamParams):
99
+
100
+ Returns:
101
+ Response[UpdateTeamResponse]
102
+ """
103
+
104
+ return sync_detailed(
105
+ slug=slug,
106
+ client=client,
107
+ json_body=json_body,
108
+ ).parsed
109
+
110
+
111
+ async def asyncio_detailed(
112
+ slug: str,
113
+ *,
114
+ client: AuthenticatedClient,
115
+ json_body: UpdateTeamParams,
116
+ ) -> Response[UpdateTeamResponse]:
117
+ """Update Team
118
+
119
+ Update a team with a new name or slug. Note that updating the team with a new slug will cause all
120
+ your URLs to change!
121
+
122
+ Args:
123
+ slug (str): The slug of the team to update
124
+ json_body (UpdateTeamParams):
125
+
126
+ Returns:
127
+ Response[UpdateTeamResponse]
128
+ """
129
+
130
+ kwargs = _get_kwargs(
131
+ slug=slug,
132
+ client=client,
133
+ json_body=json_body,
134
+ )
135
+
136
+ async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
137
+ response = await _client.request(**kwargs)
138
+
139
+ return _build_response(response=response)
140
+
141
+
142
+ async def asyncio(
143
+ slug: str,
144
+ *,
145
+ client: AuthenticatedClient,
146
+ json_body: UpdateTeamParams,
147
+ ) -> Optional[UpdateTeamResponse]:
148
+ """Update Team
149
+
150
+ Update a team with a new name or slug. Note that updating the team with a new slug will cause all
151
+ your URLs to change!
152
+
153
+ Args:
154
+ slug (str): The slug of the team to update
155
+ json_body (UpdateTeamParams):
156
+
157
+ Returns:
158
+ Response[UpdateTeamResponse]
159
+ """
160
+
161
+ return (
162
+ await asyncio_detailed(
163
+ slug=slug,
164
+ client=client,
165
+ json_body=json_body,
166
+ )
167
+ ).parsed
@@ -0,0 +1,150 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional
3
+
4
+ import httpx
5
+
6
+ from ...client import AuthenticatedClient
7
+ from ...models.update_user_params import UpdateUserParams
8
+ from ...models.update_user_response import UpdateUserResponse
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ *,
14
+ client: AuthenticatedClient,
15
+ json_body: UpdateUserParams,
16
+ ) -> Dict[str, Any]:
17
+ url = "{}/user".format(client.base_url)
18
+
19
+ headers: Dict[str, str] = client.get_headers()
20
+ cookies: Dict[str, Any] = client.get_cookies()
21
+
22
+ json_json_body = json_body.to_dict()
23
+
24
+ return {
25
+ "method": "put",
26
+ "url": url,
27
+ "headers": headers,
28
+ "cookies": cookies,
29
+ "timeout": client.get_timeout(),
30
+ "json": json_json_body,
31
+ }
32
+
33
+
34
+ def _parse_response(*, response: httpx.Response) -> Optional[UpdateUserResponse]:
35
+ if response.status_code == 200:
36
+ response_200 = UpdateUserResponse.from_dict(response.json())
37
+
38
+ return response_200
39
+ return None
40
+
41
+
42
+ def _build_response(*, response: httpx.Response) -> Response[UpdateUserResponse]:
43
+ return Response(
44
+ status_code=HTTPStatus(response.status_code),
45
+ content=response.content,
46
+ headers=response.headers,
47
+ parsed=_parse_response(response=response),
48
+ )
49
+
50
+
51
+ def sync_detailed(
52
+ *,
53
+ client: AuthenticatedClient,
54
+ json_body: UpdateUserParams,
55
+ ) -> Response[UpdateUserResponse]:
56
+ """Update user profile
57
+
58
+ Updates your current user profile.
59
+
60
+ Args:
61
+ json_body (UpdateUserParams):
62
+
63
+ Returns:
64
+ Response[UpdateUserResponse]
65
+ """
66
+
67
+ kwargs = _get_kwargs(
68
+ client=client,
69
+ json_body=json_body,
70
+ )
71
+
72
+ response = httpx.request(
73
+ verify=client.verify_ssl,
74
+ **kwargs,
75
+ )
76
+
77
+ return _build_response(response=response)
78
+
79
+
80
+ def sync(
81
+ *,
82
+ client: AuthenticatedClient,
83
+ json_body: UpdateUserParams,
84
+ ) -> Optional[UpdateUserResponse]:
85
+ """Update user profile
86
+
87
+ Updates your current user profile.
88
+
89
+ Args:
90
+ json_body (UpdateUserParams):
91
+
92
+ Returns:
93
+ Response[UpdateUserResponse]
94
+ """
95
+
96
+ return sync_detailed(
97
+ client=client,
98
+ json_body=json_body,
99
+ ).parsed
100
+
101
+
102
+ async def asyncio_detailed(
103
+ *,
104
+ client: AuthenticatedClient,
105
+ json_body: UpdateUserParams,
106
+ ) -> Response[UpdateUserResponse]:
107
+ """Update user profile
108
+
109
+ Updates your current user profile.
110
+
111
+ Args:
112
+ json_body (UpdateUserParams):
113
+
114
+ Returns:
115
+ Response[UpdateUserResponse]
116
+ """
117
+
118
+ kwargs = _get_kwargs(
119
+ client=client,
120
+ json_body=json_body,
121
+ )
122
+
123
+ async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
124
+ response = await _client.request(**kwargs)
125
+
126
+ return _build_response(response=response)
127
+
128
+
129
+ async def asyncio(
130
+ *,
131
+ client: AuthenticatedClient,
132
+ json_body: UpdateUserParams,
133
+ ) -> Optional[UpdateUserResponse]:
134
+ """Update user profile
135
+
136
+ Updates your current user profile.
137
+
138
+ Args:
139
+ json_body (UpdateUserParams):
140
+
141
+ Returns:
142
+ Response[UpdateUserResponse]
143
+ """
144
+
145
+ return (
146
+ await asyncio_detailed(
147
+ client=client,
148
+ json_body=json_body,
149
+ )
150
+ ).parsed
@@ -0,0 +1,51 @@
1
+ import ssl
2
+ from typing import Dict, Union
3
+
4
+ import attr
5
+
6
+
7
+ @attr.s(auto_attribs=True)
8
+ class Client:
9
+ """A class for keeping track of data related to the API"""
10
+
11
+ base_url: str
12
+ cookies: Dict[str, str] = attr.ib(factory=dict, kw_only=True)
13
+ headers: Dict[str, str] = attr.ib(factory=dict, kw_only=True)
14
+ timeout: float = attr.ib(5.0, kw_only=True)
15
+ verify_ssl: Union[str, bool, ssl.SSLContext] = attr.ib(True, kw_only=True)
16
+
17
+ def get_headers(self) -> Dict[str, str]:
18
+ """Get headers to be used in all endpoints"""
19
+ return {**self.headers}
20
+
21
+ def with_headers(self, headers: Dict[str, str]) -> "Client":
22
+ """Get a new client matching this one with additional headers"""
23
+ return attr.evolve(self, headers={**self.headers, **headers})
24
+
25
+ def get_cookies(self) -> Dict[str, str]:
26
+ return {**self.cookies}
27
+
28
+ def with_cookies(self, cookies: Dict[str, str]) -> "Client":
29
+ """Get a new client matching this one with additional cookies"""
30
+ return attr.evolve(self, cookies={**self.cookies, **cookies})
31
+
32
+ def get_timeout(self) -> float:
33
+ return self.timeout
34
+
35
+ def with_timeout(self, timeout: float) -> "Client":
36
+ """Get a new client matching this one with a new timeout (in seconds)"""
37
+ return attr.evolve(self, timeout=timeout)
38
+
39
+
40
+ @attr.s(auto_attribs=True)
41
+ class AuthenticatedClient(Client):
42
+ """A Client which has been authenticated for use on secured endpoints"""
43
+
44
+ token: str
45
+ prefix: str = "Bearer"
46
+ auth_header_name: str = "Authorization"
47
+
48
+ def get_headers(self) -> Dict[str, str]:
49
+ auth_header_value = f"{self.prefix} {self.token}" if self.prefix else self.token
50
+ """Get headers to be used in authenticated endpoints"""
51
+ return {self.auth_header_name: auth_header_value, **self.headers}
@@ -0,0 +1,193 @@
1
+ """ Contains all the data models used in inputs/outputs """
2
+
3
+ from .accept_invitation_params import AcceptInvitationParams
4
+ from .accept_invitation_response import AcceptInvitationResponse
5
+ from .account import Account
6
+ from .api_key import APIKey
7
+ from .app import App
8
+ from .app_statistics import AppStatistics
9
+ from .app_summary import AppSummary
10
+ from .app_version import AppVersion
11
+ from .cancel_run_response import CancelRunResponse
12
+ from .claim_device_login_ticket_params import ClaimDeviceLoginTicketParams
13
+ from .claim_device_login_ticket_response import ClaimDeviceLoginTicketResponse
14
+ from .create_account_params import CreateAccountParams
15
+ from .create_account_params_flags_struct import CreateAccountParamsFlagsStruct
16
+ from .create_account_response import CreateAccountResponse
17
+ from .create_api_key_params import CreateAPIKeyParams
18
+ from .create_api_key_response import CreateAPIKeyResponse
19
+ from .create_app_params import CreateAppParams
20
+ from .create_app_response import CreateAppResponse
21
+ from .create_device_login_ticket_response import CreateDeviceLoginTicketResponse
22
+ from .create_secret_params import CreateSecretParams
23
+ from .create_secret_response import CreateSecretResponse
24
+ from .create_session_params import CreateSessionParams
25
+ from .create_session_response import CreateSessionResponse
26
+ from .create_team_params import CreateTeamParams
27
+ from .create_team_response import CreateTeamResponse
28
+ from .delete_api_key_params import DeleteAPIKeyParams
29
+ from .delete_api_key_response import DeleteAPIKeyResponse
30
+ from .delete_app_response import DeleteAppResponse
31
+ from .delete_team_invitation_params import DeleteTeamInvitationParams
32
+ from .delete_team_invitation_response import DeleteTeamInvitationResponse
33
+ from .delete_team_params import DeleteTeamParams
34
+ from .delete_team_response import DeleteTeamResponse
35
+ from .deploy_app_response import DeployAppResponse
36
+ from .describe_app_response import DescribeAppResponse
37
+ from .describe_app_version_response import DescribeAppVersionResponse
38
+ from .describe_device_login_session_response import DescribeDeviceLoginSessionResponse
39
+ from .describe_run_response import DescribeRunResponse
40
+ from .describe_secrets_key_response import DescribeSecretsKeyResponse
41
+ from .describe_session_response import DescribeSessionResponse
42
+ from .error_detail import ErrorDetail
43
+ from .error_model import ErrorModel
44
+ from .export_secrets_response import ExportSecretsResponse
45
+ from .export_user_secrets_params import ExportUserSecretsParams
46
+ from .exported_secret import ExportedSecret
47
+ from .generate_app_statistics_response import GenerateAppStatisticsResponse
48
+ from .generate_run_statistics_response import GenerateRunStatisticsResponse
49
+ from .get_run_log_line import GetRunLogLine
50
+ from .get_run_logs_output_body import GetRunLogsOutputBody
51
+ from .invite_team_member_params import InviteTeamMemberParams
52
+ from .invite_team_member_response import InviteTeamMemberResponse
53
+ from .leave_team_response import LeaveTeamResponse
54
+ from .list_api_keys_response import ListAPIKeysResponse
55
+ from .list_app_environments_response import ListAppEnvironmentsResponse
56
+ from .list_app_versions_response import ListAppVersionsResponse
57
+ from .list_apps_response import ListAppsResponse
58
+ from .list_apps_status_item import ListAppsStatusItem
59
+ from .list_my_team_invitations_response import ListMyTeamInvitationsResponse
60
+ from .list_runs_response import ListRunsResponse
61
+ from .list_secret_environments_response import ListSecretEnvironmentsResponse
62
+ from .list_secrets_response import ListSecretsResponse
63
+ from .list_team_invitations_response import ListTeamInvitationsResponse
64
+ from .list_team_members_response import ListTeamMembersResponse
65
+ from .list_teams_response import ListTeamsResponse
66
+ from .log_line import LogLine
67
+ from .log_line_error import LogLineError
68
+ from .pagination import Pagination
69
+ from .parameter import Parameter
70
+ from .refresh_session_response import RefreshSessionResponse
71
+ from .remove_team_member_params import RemoveTeamMemberParams
72
+ from .remove_team_member_response import RemoveTeamMemberResponse
73
+ from .resend_team_invitation_params import ResendTeamInvitationParams
74
+ from .resend_team_invitation_response import ResendTeamInvitationResponse
75
+ from .run import Run
76
+ from .run_app_params import RunAppParams
77
+ from .run_app_params_parameters import RunAppParamsParameters
78
+ from .run_app_response import RunAppResponse
79
+ from .run_results import RunResults
80
+ from .run_statistics import RunStatistics
81
+ from .secret import Secret
82
+ from .series_point import SeriesPoint
83
+ from .session import Session
84
+ from .statistics_settings import StatisticsSettings
85
+ from .team import Team
86
+ from .team_invitation import TeamInvitation
87
+ from .token import Token
88
+ from .update_account_slug_params import UpdateAccountSlugParams
89
+ from .update_account_slug_response import UpdateAccountSlugResponse
90
+ from .update_my_team_invitation_params import UpdateMyTeamInvitationParams
91
+ from .update_my_team_invitation_response import UpdateMyTeamInvitationResponse
92
+ from .update_team_params import UpdateTeamParams
93
+ from .update_team_response import UpdateTeamResponse
94
+ from .update_user_params import UpdateUserParams
95
+ from .update_user_response import UpdateUserResponse
96
+ from .user import User
97
+
98
+ __all__ = (
99
+ "AcceptInvitationParams",
100
+ "AcceptInvitationResponse",
101
+ "Account",
102
+ "APIKey",
103
+ "App",
104
+ "AppStatistics",
105
+ "AppSummary",
106
+ "AppVersion",
107
+ "CancelRunResponse",
108
+ "ClaimDeviceLoginTicketParams",
109
+ "ClaimDeviceLoginTicketResponse",
110
+ "CreateAccountParams",
111
+ "CreateAccountParamsFlagsStruct",
112
+ "CreateAccountResponse",
113
+ "CreateAPIKeyParams",
114
+ "CreateAPIKeyResponse",
115
+ "CreateAppParams",
116
+ "CreateAppResponse",
117
+ "CreateDeviceLoginTicketResponse",
118
+ "CreateSecretParams",
119
+ "CreateSecretResponse",
120
+ "CreateSessionParams",
121
+ "CreateSessionResponse",
122
+ "CreateTeamParams",
123
+ "CreateTeamResponse",
124
+ "DeleteAPIKeyParams",
125
+ "DeleteAPIKeyResponse",
126
+ "DeleteAppResponse",
127
+ "DeleteTeamInvitationParams",
128
+ "DeleteTeamInvitationResponse",
129
+ "DeleteTeamParams",
130
+ "DeleteTeamResponse",
131
+ "DeployAppResponse",
132
+ "DescribeAppResponse",
133
+ "DescribeAppVersionResponse",
134
+ "DescribeDeviceLoginSessionResponse",
135
+ "DescribeRunResponse",
136
+ "DescribeSecretsKeyResponse",
137
+ "DescribeSessionResponse",
138
+ "ErrorDetail",
139
+ "ErrorModel",
140
+ "ExportedSecret",
141
+ "ExportSecretsResponse",
142
+ "ExportUserSecretsParams",
143
+ "GenerateAppStatisticsResponse",
144
+ "GenerateRunStatisticsResponse",
145
+ "GetRunLogLine",
146
+ "GetRunLogsOutputBody",
147
+ "InviteTeamMemberParams",
148
+ "InviteTeamMemberResponse",
149
+ "LeaveTeamResponse",
150
+ "ListAPIKeysResponse",
151
+ "ListAppEnvironmentsResponse",
152
+ "ListAppsResponse",
153
+ "ListAppsStatusItem",
154
+ "ListAppVersionsResponse",
155
+ "ListMyTeamInvitationsResponse",
156
+ "ListRunsResponse",
157
+ "ListSecretEnvironmentsResponse",
158
+ "ListSecretsResponse",
159
+ "ListTeamInvitationsResponse",
160
+ "ListTeamMembersResponse",
161
+ "ListTeamsResponse",
162
+ "LogLine",
163
+ "LogLineError",
164
+ "Pagination",
165
+ "Parameter",
166
+ "RefreshSessionResponse",
167
+ "RemoveTeamMemberParams",
168
+ "RemoveTeamMemberResponse",
169
+ "ResendTeamInvitationParams",
170
+ "ResendTeamInvitationResponse",
171
+ "Run",
172
+ "RunAppParams",
173
+ "RunAppParamsParameters",
174
+ "RunAppResponse",
175
+ "RunResults",
176
+ "RunStatistics",
177
+ "Secret",
178
+ "SeriesPoint",
179
+ "Session",
180
+ "StatisticsSettings",
181
+ "Team",
182
+ "TeamInvitation",
183
+ "Token",
184
+ "UpdateAccountSlugParams",
185
+ "UpdateAccountSlugResponse",
186
+ "UpdateMyTeamInvitationParams",
187
+ "UpdateMyTeamInvitationResponse",
188
+ "UpdateTeamParams",
189
+ "UpdateTeamResponse",
190
+ "UpdateUserParams",
191
+ "UpdateUserResponse",
192
+ "User",
193
+ )