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.
- tower/__init__.py +4 -0
- tower/__main__.py +38 -0
- tower/client.py +115 -0
- tower/tower_api_client/__init__.py +7 -0
- tower/tower_api_client/api/__init__.py +1 -0
- tower/tower_api_client/api/default/__init__.py +0 -0
- tower/tower_api_client/api/default/accept_invitation.py +150 -0
- tower/tower_api_client/api/default/cancel_run.py +159 -0
- tower/tower_api_client/api/default/claim_device_login_ticket.py +154 -0
- tower/tower_api_client/api/default/create_account.py +150 -0
- tower/tower_api_client/api/default/create_api_key.py +142 -0
- tower/tower_api_client/api/default/create_apps.py +150 -0
- tower/tower_api_client/api/default/create_device_login_ticket.py +131 -0
- tower/tower_api_client/api/default/create_secret.py +150 -0
- tower/tower_api_client/api/default/create_session.py +150 -0
- tower/tower_api_client/api/default/create_team.py +150 -0
- tower/tower_api_client/api/default/delete_api_key.py +142 -0
- tower/tower_api_client/api/default/delete_app.py +146 -0
- tower/tower_api_client/api/default/delete_secret.py +104 -0
- tower/tower_api_client/api/default/delete_team.py +150 -0
- tower/tower_api_client/api/default/delete_team_invitation.py +167 -0
- tower/tower_api_client/api/default/deploy_app.py +166 -0
- tower/tower_api_client/api/default/describe_app.py +165 -0
- tower/tower_api_client/api/default/describe_app_version.py +163 -0
- tower/tower_api_client/api/default/describe_device_login_session.py +154 -0
- tower/tower_api_client/api/default/describe_run.py +172 -0
- tower/tower_api_client/api/default/describe_secrets_key.py +160 -0
- tower/tower_api_client/api/default/describe_session.py +125 -0
- tower/tower_api_client/api/default/export_secrets.py +218 -0
- tower/tower_api_client/api/default/generate_app_statistics.py +129 -0
- tower/tower_api_client/api/default/generate_run_statistics.py +160 -0
- tower/tower_api_client/api/default/get_app_run_logs.py +159 -0
- tower/tower_api_client/api/default/invite_team_member.py +163 -0
- tower/tower_api_client/api/default/leave_team.py +150 -0
- tower/tower_api_client/api/default/list_api_keys.py +125 -0
- tower/tower_api_client/api/default/list_app_environments.py +150 -0
- tower/tower_api_client/api/default/list_app_versions.py +146 -0
- tower/tower_api_client/api/default/list_apps.py +247 -0
- tower/tower_api_client/api/default/list_my_team_invitations.py +129 -0
- tower/tower_api_client/api/default/list_runs.py +184 -0
- tower/tower_api_client/api/default/list_secret_environments.py +129 -0
- tower/tower_api_client/api/default/list_secrets.py +201 -0
- tower/tower_api_client/api/default/list_team_invitations.py +150 -0
- tower/tower_api_client/api/default/list_team_members.py +146 -0
- tower/tower_api_client/api/default/list_teams.py +125 -0
- tower/tower_api_client/api/default/refresh_session.py +129 -0
- tower/tower_api_client/api/default/remove_team_member.py +163 -0
- tower/tower_api_client/api/default/resend_team_invitation.py +167 -0
- tower/tower_api_client/api/default/run_app.py +176 -0
- tower/tower_api_client/api/default/stream_app_run_logs.py +100 -0
- tower/tower_api_client/api/default/update_account_slug.py +163 -0
- tower/tower_api_client/api/default/update_my_team_invitation.py +154 -0
- tower/tower_api_client/api/default/update_team.py +167 -0
- tower/tower_api_client/api/default/update_user.py +150 -0
- tower/tower_api_client/client.py +51 -0
- tower/tower_api_client/models/__init__.py +193 -0
- tower/tower_api_client/models/accept_invitation_params.py +49 -0
- tower/tower_api_client/models/accept_invitation_response.py +56 -0
- tower/tower_api_client/models/account.py +45 -0
- tower/tower_api_client/models/api_key.py +67 -0
- tower/tower_api_client/models/app.py +122 -0
- tower/tower_api_client/models/app_statistics.py +66 -0
- tower/tower_api_client/models/app_summary.py +81 -0
- tower/tower_api_client/models/app_version.py +71 -0
- tower/tower_api_client/models/cancel_run_response.py +56 -0
- tower/tower_api_client/models/claim_device_login_ticket_params.py +49 -0
- tower/tower_api_client/models/claim_device_login_ticket_response.py +49 -0
- tower/tower_api_client/models/create_account_params.py +91 -0
- tower/tower_api_client/models/create_account_params_flags_struct.py +38 -0
- tower/tower_api_client/models/create_account_response.py +56 -0
- tower/tower_api_client/models/create_api_key_params.py +49 -0
- tower/tower_api_client/models/create_api_key_response.py +56 -0
- tower/tower_api_client/models/create_app_params.py +57 -0
- tower/tower_api_client/models/create_app_response.py +56 -0
- tower/tower_api_client/models/create_device_login_ticket_response.py +94 -0
- tower/tower_api_client/models/create_secret_params.py +70 -0
- tower/tower_api_client/models/create_secret_response.py +56 -0
- tower/tower_api_client/models/create_session_params.py +56 -0
- tower/tower_api_client/models/create_session_response.py +56 -0
- tower/tower_api_client/models/create_team_params.py +56 -0
- tower/tower_api_client/models/create_team_response.py +56 -0
- tower/tower_api_client/models/delete_api_key_params.py +49 -0
- tower/tower_api_client/models/delete_api_key_response.py +56 -0
- tower/tower_api_client/models/delete_app_response.py +56 -0
- tower/tower_api_client/models/delete_team_invitation_params.py +49 -0
- tower/tower_api_client/models/delete_team_invitation_response.py +56 -0
- tower/tower_api_client/models/delete_team_params.py +49 -0
- tower/tower_api_client/models/delete_team_response.py +56 -0
- tower/tower_api_client/models/deploy_app_response.py +56 -0
- tower/tower_api_client/models/describe_app_response.py +75 -0
- tower/tower_api_client/models/describe_app_version_response.py +56 -0
- tower/tower_api_client/models/describe_device_login_session_response.py +56 -0
- tower/tower_api_client/models/describe_run_response.py +56 -0
- tower/tower_api_client/models/describe_secrets_key_response.py +49 -0
- tower/tower_api_client/models/describe_session_response.py +56 -0
- tower/tower_api_client/models/error_detail.py +54 -0
- tower/tower_api_client/models/error_model.py +109 -0
- tower/tower_api_client/models/export_secrets_response.py +75 -0
- tower/tower_api_client/models/export_user_secrets_params.py +49 -0
- tower/tower_api_client/models/exported_secret.py +62 -0
- tower/tower_api_client/models/generate_app_statistics_response.py +56 -0
- tower/tower_api_client/models/generate_run_statistics_response.py +85 -0
- tower/tower_api_client/models/get_run_log_line.py +47 -0
- tower/tower_api_client/models/get_run_logs_output_body.py +65 -0
- tower/tower_api_client/models/invite_team_member_params.py +58 -0
- tower/tower_api_client/models/invite_team_member_response.py +65 -0
- tower/tower_api_client/models/leave_team_response.py +56 -0
- tower/tower_api_client/models/list_api_keys_response.py +65 -0
- tower/tower_api_client/models/list_app_environments_response.py +50 -0
- tower/tower_api_client/models/list_app_versions_response.py +65 -0
- tower/tower_api_client/models/list_apps_response.py +75 -0
- tower/tower_api_client/models/list_apps_status_item.py +11 -0
- tower/tower_api_client/models/list_my_team_invitations_response.py +65 -0
- tower/tower_api_client/models/list_runs_response.py +75 -0
- tower/tower_api_client/models/list_secret_environments_response.py +50 -0
- tower/tower_api_client/models/list_secrets_response.py +75 -0
- tower/tower_api_client/models/list_team_invitations_response.py +65 -0
- tower/tower_api_client/models/list_team_members_response.py +65 -0
- tower/tower_api_client/models/list_teams_response.py +65 -0
- tower/tower_api_client/models/log_line.py +62 -0
- tower/tower_api_client/models/log_line_error.py +47 -0
- tower/tower_api_client/models/pagination.py +59 -0
- tower/tower_api_client/models/parameter.py +52 -0
- tower/tower_api_client/models/refresh_session_response.py +66 -0
- tower/tower_api_client/models/remove_team_member_params.py +49 -0
- tower/tower_api_client/models/remove_team_member_response.py +56 -0
- tower/tower_api_client/models/resend_team_invitation_params.py +57 -0
- tower/tower_api_client/models/resend_team_invitation_response.py +56 -0
- tower/tower_api_client/models/run.py +129 -0
- tower/tower_api_client/models/run_app_params.py +72 -0
- tower/tower_api_client/models/run_app_params_parameters.py +43 -0
- tower/tower_api_client/models/run_app_response.py +56 -0
- tower/tower_api_client/models/run_results.py +73 -0
- tower/tower_api_client/models/run_statistics.py +52 -0
- tower/tower_api_client/models/secret.py +62 -0
- tower/tower_api_client/models/series_point.py +52 -0
- tower/tower_api_client/models/session.py +73 -0
- tower/tower_api_client/models/statistics_settings.py +38 -0
- tower/tower_api_client/models/team.py +75 -0
- tower/tower_api_client/models/team_invitation.py +61 -0
- tower/tower_api_client/models/token.py +38 -0
- tower/tower_api_client/models/update_account_slug_params.py +49 -0
- tower/tower_api_client/models/update_account_slug_response.py +56 -0
- tower/tower_api_client/models/update_my_team_invitation_params.py +56 -0
- tower/tower_api_client/models/update_my_team_invitation_response.py +39 -0
- tower/tower_api_client/models/update_team_params.py +58 -0
- tower/tower_api_client/models/update_team_response.py +56 -0
- tower/tower_api_client/models/update_user_params.py +71 -0
- tower/tower_api_client/models/update_user_response.py +56 -0
- tower/tower_api_client/models/user.py +90 -0
- tower/tower_api_client/types.py +44 -0
- tower-0.3.4.data/scripts/tower +0 -0
- tower-0.3.4.dist-info/METADATA +115 -0
- tower-0.3.4.dist-info/RECORD +156 -0
- tower-0.3.4.dist-info/WHEEL +4 -0
- tower-0.3.4.dist-info/licenses/LICENSE +21 -0
|
@@ -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 Client
|
|
7
|
+
from ...models.create_session_params import CreateSessionParams
|
|
8
|
+
from ...models.create_session_response import CreateSessionResponse
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
*,
|
|
14
|
+
client: Client,
|
|
15
|
+
json_body: CreateSessionParams,
|
|
16
|
+
) -> Dict[str, Any]:
|
|
17
|
+
url = "{}/session".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": "post",
|
|
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[CreateSessionResponse]:
|
|
35
|
+
if response.status_code == 200:
|
|
36
|
+
response_200 = CreateSessionResponse.from_dict(response.json())
|
|
37
|
+
|
|
38
|
+
return response_200
|
|
39
|
+
return None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _build_response(*, response: httpx.Response) -> Response[CreateSessionResponse]:
|
|
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: Client,
|
|
54
|
+
json_body: CreateSessionParams,
|
|
55
|
+
) -> Response[CreateSessionResponse]:
|
|
56
|
+
"""Create session
|
|
57
|
+
|
|
58
|
+
Create a new session and return it.
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
json_body (CreateSessionParams):
|
|
62
|
+
|
|
63
|
+
Returns:
|
|
64
|
+
Response[CreateSessionResponse]
|
|
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: Client,
|
|
83
|
+
json_body: CreateSessionParams,
|
|
84
|
+
) -> Optional[CreateSessionResponse]:
|
|
85
|
+
"""Create session
|
|
86
|
+
|
|
87
|
+
Create a new session and return it.
|
|
88
|
+
|
|
89
|
+
Args:
|
|
90
|
+
json_body (CreateSessionParams):
|
|
91
|
+
|
|
92
|
+
Returns:
|
|
93
|
+
Response[CreateSessionResponse]
|
|
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: Client,
|
|
105
|
+
json_body: CreateSessionParams,
|
|
106
|
+
) -> Response[CreateSessionResponse]:
|
|
107
|
+
"""Create session
|
|
108
|
+
|
|
109
|
+
Create a new session and return it.
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
json_body (CreateSessionParams):
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
Response[CreateSessionResponse]
|
|
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: Client,
|
|
132
|
+
json_body: CreateSessionParams,
|
|
133
|
+
) -> Optional[CreateSessionResponse]:
|
|
134
|
+
"""Create session
|
|
135
|
+
|
|
136
|
+
Create a new session and return it.
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
json_body (CreateSessionParams):
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
Response[CreateSessionResponse]
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
await asyncio_detailed(
|
|
147
|
+
client=client,
|
|
148
|
+
json_body=json_body,
|
|
149
|
+
)
|
|
150
|
+
).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.create_team_params import CreateTeamParams
|
|
8
|
+
from ...models.create_team_response import CreateTeamResponse
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
*,
|
|
14
|
+
client: AuthenticatedClient,
|
|
15
|
+
json_body: CreateTeamParams,
|
|
16
|
+
) -> Dict[str, Any]:
|
|
17
|
+
url = "{}/teams".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": "post",
|
|
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[CreateTeamResponse]:
|
|
35
|
+
if response.status_code == 200:
|
|
36
|
+
response_200 = CreateTeamResponse.from_dict(response.json())
|
|
37
|
+
|
|
38
|
+
return response_200
|
|
39
|
+
return None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _build_response(*, response: httpx.Response) -> Response[CreateTeamResponse]:
|
|
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: CreateTeamParams,
|
|
55
|
+
) -> Response[CreateTeamResponse]:
|
|
56
|
+
"""Create Team
|
|
57
|
+
|
|
58
|
+
Create a new team
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
json_body (CreateTeamParams):
|
|
62
|
+
|
|
63
|
+
Returns:
|
|
64
|
+
Response[CreateTeamResponse]
|
|
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: CreateTeamParams,
|
|
84
|
+
) -> Optional[CreateTeamResponse]:
|
|
85
|
+
"""Create Team
|
|
86
|
+
|
|
87
|
+
Create a new team
|
|
88
|
+
|
|
89
|
+
Args:
|
|
90
|
+
json_body (CreateTeamParams):
|
|
91
|
+
|
|
92
|
+
Returns:
|
|
93
|
+
Response[CreateTeamResponse]
|
|
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: CreateTeamParams,
|
|
106
|
+
) -> Response[CreateTeamResponse]:
|
|
107
|
+
"""Create Team
|
|
108
|
+
|
|
109
|
+
Create a new team
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
json_body (CreateTeamParams):
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
Response[CreateTeamResponse]
|
|
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: CreateTeamParams,
|
|
133
|
+
) -> Optional[CreateTeamResponse]:
|
|
134
|
+
"""Create Team
|
|
135
|
+
|
|
136
|
+
Create a new team
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
json_body (CreateTeamParams):
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
Response[CreateTeamResponse]
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
await asyncio_detailed(
|
|
147
|
+
client=client,
|
|
148
|
+
json_body=json_body,
|
|
149
|
+
)
|
|
150
|
+
).parsed
|
|
@@ -0,0 +1,142 @@
|
|
|
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.delete_api_key_params import DeleteAPIKeyParams
|
|
8
|
+
from ...models.delete_api_key_response import DeleteAPIKeyResponse
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
*,
|
|
14
|
+
client: AuthenticatedClient,
|
|
15
|
+
json_body: DeleteAPIKeyParams,
|
|
16
|
+
) -> Dict[str, Any]:
|
|
17
|
+
url = "{}/api-keys".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": "delete",
|
|
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[DeleteAPIKeyResponse]:
|
|
35
|
+
if response.status_code == 200:
|
|
36
|
+
response_200 = DeleteAPIKeyResponse.from_dict(response.json())
|
|
37
|
+
|
|
38
|
+
return response_200
|
|
39
|
+
return None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _build_response(*, response: httpx.Response) -> Response[DeleteAPIKeyResponse]:
|
|
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: DeleteAPIKeyParams,
|
|
55
|
+
) -> Response[DeleteAPIKeyResponse]:
|
|
56
|
+
"""Delete API Key
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
json_body (DeleteAPIKeyParams):
|
|
60
|
+
|
|
61
|
+
Returns:
|
|
62
|
+
Response[DeleteAPIKeyResponse]
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
kwargs = _get_kwargs(
|
|
66
|
+
client=client,
|
|
67
|
+
json_body=json_body,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
response = httpx.request(
|
|
71
|
+
verify=client.verify_ssl,
|
|
72
|
+
**kwargs,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
return _build_response(response=response)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def sync(
|
|
79
|
+
*,
|
|
80
|
+
client: AuthenticatedClient,
|
|
81
|
+
json_body: DeleteAPIKeyParams,
|
|
82
|
+
) -> Optional[DeleteAPIKeyResponse]:
|
|
83
|
+
"""Delete API Key
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
json_body (DeleteAPIKeyParams):
|
|
87
|
+
|
|
88
|
+
Returns:
|
|
89
|
+
Response[DeleteAPIKeyResponse]
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
return sync_detailed(
|
|
93
|
+
client=client,
|
|
94
|
+
json_body=json_body,
|
|
95
|
+
).parsed
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
async def asyncio_detailed(
|
|
99
|
+
*,
|
|
100
|
+
client: AuthenticatedClient,
|
|
101
|
+
json_body: DeleteAPIKeyParams,
|
|
102
|
+
) -> Response[DeleteAPIKeyResponse]:
|
|
103
|
+
"""Delete API Key
|
|
104
|
+
|
|
105
|
+
Args:
|
|
106
|
+
json_body (DeleteAPIKeyParams):
|
|
107
|
+
|
|
108
|
+
Returns:
|
|
109
|
+
Response[DeleteAPIKeyResponse]
|
|
110
|
+
"""
|
|
111
|
+
|
|
112
|
+
kwargs = _get_kwargs(
|
|
113
|
+
client=client,
|
|
114
|
+
json_body=json_body,
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
118
|
+
response = await _client.request(**kwargs)
|
|
119
|
+
|
|
120
|
+
return _build_response(response=response)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
async def asyncio(
|
|
124
|
+
*,
|
|
125
|
+
client: AuthenticatedClient,
|
|
126
|
+
json_body: DeleteAPIKeyParams,
|
|
127
|
+
) -> Optional[DeleteAPIKeyResponse]:
|
|
128
|
+
"""Delete API Key
|
|
129
|
+
|
|
130
|
+
Args:
|
|
131
|
+
json_body (DeleteAPIKeyParams):
|
|
132
|
+
|
|
133
|
+
Returns:
|
|
134
|
+
Response[DeleteAPIKeyResponse]
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
return (
|
|
138
|
+
await asyncio_detailed(
|
|
139
|
+
client=client,
|
|
140
|
+
json_body=json_body,
|
|
141
|
+
)
|
|
142
|
+
).parsed
|
|
@@ -0,0 +1,146 @@
|
|
|
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.delete_app_response import DeleteAppResponse
|
|
8
|
+
from ...types import Response
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
name: str,
|
|
13
|
+
*,
|
|
14
|
+
client: AuthenticatedClient,
|
|
15
|
+
) -> Dict[str, Any]:
|
|
16
|
+
url = "{}/apps/{name}".format(client.base_url, name=name)
|
|
17
|
+
|
|
18
|
+
headers: Dict[str, str] = client.get_headers()
|
|
19
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
"method": "delete",
|
|
23
|
+
"url": url,
|
|
24
|
+
"headers": headers,
|
|
25
|
+
"cookies": cookies,
|
|
26
|
+
"timeout": client.get_timeout(),
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _parse_response(*, response: httpx.Response) -> Optional[DeleteAppResponse]:
|
|
31
|
+
if response.status_code == 200:
|
|
32
|
+
response_200 = DeleteAppResponse.from_dict(response.json())
|
|
33
|
+
|
|
34
|
+
return response_200
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _build_response(*, response: httpx.Response) -> Response[DeleteAppResponse]:
|
|
39
|
+
return Response(
|
|
40
|
+
status_code=HTTPStatus(response.status_code),
|
|
41
|
+
content=response.content,
|
|
42
|
+
headers=response.headers,
|
|
43
|
+
parsed=_parse_response(response=response),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def sync_detailed(
|
|
48
|
+
name: str,
|
|
49
|
+
*,
|
|
50
|
+
client: AuthenticatedClient,
|
|
51
|
+
) -> Response[DeleteAppResponse]:
|
|
52
|
+
"""Delete app
|
|
53
|
+
|
|
54
|
+
Delete one of your apps, the associated code, and all the runs as well.
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
name (str): The name of the app to delete.
|
|
58
|
+
|
|
59
|
+
Returns:
|
|
60
|
+
Response[DeleteAppResponse]
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
kwargs = _get_kwargs(
|
|
64
|
+
name=name,
|
|
65
|
+
client=client,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
response = httpx.request(
|
|
69
|
+
verify=client.verify_ssl,
|
|
70
|
+
**kwargs,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
return _build_response(response=response)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def sync(
|
|
77
|
+
name: str,
|
|
78
|
+
*,
|
|
79
|
+
client: AuthenticatedClient,
|
|
80
|
+
) -> Optional[DeleteAppResponse]:
|
|
81
|
+
"""Delete app
|
|
82
|
+
|
|
83
|
+
Delete one of your apps, the associated code, and all the runs as well.
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
name (str): The name of the app to delete.
|
|
87
|
+
|
|
88
|
+
Returns:
|
|
89
|
+
Response[DeleteAppResponse]
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
return sync_detailed(
|
|
93
|
+
name=name,
|
|
94
|
+
client=client,
|
|
95
|
+
).parsed
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
async def asyncio_detailed(
|
|
99
|
+
name: str,
|
|
100
|
+
*,
|
|
101
|
+
client: AuthenticatedClient,
|
|
102
|
+
) -> Response[DeleteAppResponse]:
|
|
103
|
+
"""Delete app
|
|
104
|
+
|
|
105
|
+
Delete one of your apps, the associated code, and all the runs as well.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
name (str): The name of the app to delete.
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
Response[DeleteAppResponse]
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
kwargs = _get_kwargs(
|
|
115
|
+
name=name,
|
|
116
|
+
client=client,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
120
|
+
response = await _client.request(**kwargs)
|
|
121
|
+
|
|
122
|
+
return _build_response(response=response)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
async def asyncio(
|
|
126
|
+
name: str,
|
|
127
|
+
*,
|
|
128
|
+
client: AuthenticatedClient,
|
|
129
|
+
) -> Optional[DeleteAppResponse]:
|
|
130
|
+
"""Delete app
|
|
131
|
+
|
|
132
|
+
Delete one of your apps, the associated code, and all the runs as well.
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
name (str): The name of the app to delete.
|
|
136
|
+
|
|
137
|
+
Returns:
|
|
138
|
+
Response[DeleteAppResponse]
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
return (
|
|
142
|
+
await asyncio_detailed(
|
|
143
|
+
name=name,
|
|
144
|
+
client=client,
|
|
145
|
+
)
|
|
146
|
+
).parsed
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ...client import AuthenticatedClient
|
|
7
|
+
from ...types import UNSET, Response, Unset
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def _get_kwargs(
|
|
11
|
+
name: str,
|
|
12
|
+
*,
|
|
13
|
+
client: AuthenticatedClient,
|
|
14
|
+
environment: Union[Unset, None, str] = UNSET,
|
|
15
|
+
) -> Dict[str, Any]:
|
|
16
|
+
url = "{}/secrets/{name}".format(client.base_url, name=name)
|
|
17
|
+
|
|
18
|
+
headers: Dict[str, str] = client.get_headers()
|
|
19
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
20
|
+
|
|
21
|
+
params: Dict[str, Any] = {}
|
|
22
|
+
params["environment"] = environment
|
|
23
|
+
|
|
24
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
"method": "delete",
|
|
28
|
+
"url": url,
|
|
29
|
+
"headers": headers,
|
|
30
|
+
"cookies": cookies,
|
|
31
|
+
"timeout": client.get_timeout(),
|
|
32
|
+
"params": params,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
|
37
|
+
return Response(
|
|
38
|
+
status_code=HTTPStatus(response.status_code),
|
|
39
|
+
content=response.content,
|
|
40
|
+
headers=response.headers,
|
|
41
|
+
parsed=None,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def sync_detailed(
|
|
46
|
+
name: str,
|
|
47
|
+
*,
|
|
48
|
+
client: AuthenticatedClient,
|
|
49
|
+
environment: Union[Unset, None, str] = UNSET,
|
|
50
|
+
) -> Response[Any]:
|
|
51
|
+
"""Delete a secret.
|
|
52
|
+
|
|
53
|
+
Delete a secret by name.
|
|
54
|
+
|
|
55
|
+
Args:
|
|
56
|
+
name (str): The name of the secret to delete.
|
|
57
|
+
environment (Union[Unset, None, str]): The environment of the secret to delete.
|
|
58
|
+
|
|
59
|
+
Returns:
|
|
60
|
+
Response[Any]
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
kwargs = _get_kwargs(
|
|
64
|
+
name=name,
|
|
65
|
+
client=client,
|
|
66
|
+
environment=environment,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
response = httpx.request(
|
|
70
|
+
verify=client.verify_ssl,
|
|
71
|
+
**kwargs,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
return _build_response(response=response)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
async def asyncio_detailed(
|
|
78
|
+
name: str,
|
|
79
|
+
*,
|
|
80
|
+
client: AuthenticatedClient,
|
|
81
|
+
environment: Union[Unset, None, str] = UNSET,
|
|
82
|
+
) -> Response[Any]:
|
|
83
|
+
"""Delete a secret.
|
|
84
|
+
|
|
85
|
+
Delete a secret by name.
|
|
86
|
+
|
|
87
|
+
Args:
|
|
88
|
+
name (str): The name of the secret to delete.
|
|
89
|
+
environment (Union[Unset, None, str]): The environment of the secret to delete.
|
|
90
|
+
|
|
91
|
+
Returns:
|
|
92
|
+
Response[Any]
|
|
93
|
+
"""
|
|
94
|
+
|
|
95
|
+
kwargs = _get_kwargs(
|
|
96
|
+
name=name,
|
|
97
|
+
client=client,
|
|
98
|
+
environment=environment,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
102
|
+
response = await _client.request(**kwargs)
|
|
103
|
+
|
|
104
|
+
return _build_response(response=response)
|