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,125 @@
|
|
|
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.describe_session_response import DescribeSessionResponse
|
|
8
|
+
from ...types import Response
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
*,
|
|
13
|
+
client: AuthenticatedClient,
|
|
14
|
+
) -> Dict[str, Any]:
|
|
15
|
+
url = "{}/session".format(client.base_url)
|
|
16
|
+
|
|
17
|
+
headers: Dict[str, str] = client.get_headers()
|
|
18
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
"method": "get",
|
|
22
|
+
"url": url,
|
|
23
|
+
"headers": headers,
|
|
24
|
+
"cookies": cookies,
|
|
25
|
+
"timeout": client.get_timeout(),
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _parse_response(*, response: httpx.Response) -> Optional[DescribeSessionResponse]:
|
|
30
|
+
if response.status_code == 200:
|
|
31
|
+
response_200 = DescribeSessionResponse.from_dict(response.json())
|
|
32
|
+
|
|
33
|
+
return response_200
|
|
34
|
+
return None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _build_response(*, response: httpx.Response) -> Response[DescribeSessionResponse]:
|
|
38
|
+
return Response(
|
|
39
|
+
status_code=HTTPStatus(response.status_code),
|
|
40
|
+
content=response.content,
|
|
41
|
+
headers=response.headers,
|
|
42
|
+
parsed=_parse_response(response=response),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def sync_detailed(
|
|
47
|
+
*,
|
|
48
|
+
client: AuthenticatedClient,
|
|
49
|
+
) -> Response[DescribeSessionResponse]:
|
|
50
|
+
"""Describe session
|
|
51
|
+
|
|
52
|
+
Validate your current session and return the user information associated with the session.
|
|
53
|
+
|
|
54
|
+
Returns:
|
|
55
|
+
Response[DescribeSessionResponse]
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
kwargs = _get_kwargs(
|
|
59
|
+
client=client,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
response = httpx.request(
|
|
63
|
+
verify=client.verify_ssl,
|
|
64
|
+
**kwargs,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
return _build_response(response=response)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def sync(
|
|
71
|
+
*,
|
|
72
|
+
client: AuthenticatedClient,
|
|
73
|
+
) -> Optional[DescribeSessionResponse]:
|
|
74
|
+
"""Describe session
|
|
75
|
+
|
|
76
|
+
Validate your current session and return the user information associated with the session.
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
Response[DescribeSessionResponse]
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
return sync_detailed(
|
|
83
|
+
client=client,
|
|
84
|
+
).parsed
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
async def asyncio_detailed(
|
|
88
|
+
*,
|
|
89
|
+
client: AuthenticatedClient,
|
|
90
|
+
) -> Response[DescribeSessionResponse]:
|
|
91
|
+
"""Describe session
|
|
92
|
+
|
|
93
|
+
Validate your current session and return the user information associated with the session.
|
|
94
|
+
|
|
95
|
+
Returns:
|
|
96
|
+
Response[DescribeSessionResponse]
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
kwargs = _get_kwargs(
|
|
100
|
+
client=client,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
104
|
+
response = await _client.request(**kwargs)
|
|
105
|
+
|
|
106
|
+
return _build_response(response=response)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
async def asyncio(
|
|
110
|
+
*,
|
|
111
|
+
client: AuthenticatedClient,
|
|
112
|
+
) -> Optional[DescribeSessionResponse]:
|
|
113
|
+
"""Describe session
|
|
114
|
+
|
|
115
|
+
Validate your current session and return the user information associated with the session.
|
|
116
|
+
|
|
117
|
+
Returns:
|
|
118
|
+
Response[DescribeSessionResponse]
|
|
119
|
+
"""
|
|
120
|
+
|
|
121
|
+
return (
|
|
122
|
+
await asyncio_detailed(
|
|
123
|
+
client=client,
|
|
124
|
+
)
|
|
125
|
+
).parsed
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ...client import AuthenticatedClient
|
|
7
|
+
from ...models.export_secrets_response import ExportSecretsResponse
|
|
8
|
+
from ...models.export_user_secrets_params import ExportUserSecretsParams
|
|
9
|
+
from ...types import UNSET, Response, Unset
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
*,
|
|
14
|
+
client: AuthenticatedClient,
|
|
15
|
+
json_body: ExportUserSecretsParams,
|
|
16
|
+
environment: Union[Unset, None, str] = UNSET,
|
|
17
|
+
all_: Union[Unset, None, bool] = UNSET,
|
|
18
|
+
page: Union[Unset, None, int] = UNSET,
|
|
19
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
20
|
+
) -> Dict[str, Any]:
|
|
21
|
+
url = "{}/secrets/export".format(client.base_url)
|
|
22
|
+
|
|
23
|
+
headers: Dict[str, str] = client.get_headers()
|
|
24
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
25
|
+
|
|
26
|
+
params: Dict[str, Any] = {}
|
|
27
|
+
params["environment"] = environment
|
|
28
|
+
|
|
29
|
+
params["all"] = all_
|
|
30
|
+
|
|
31
|
+
params["page"] = page
|
|
32
|
+
|
|
33
|
+
params["page_size"] = page_size
|
|
34
|
+
|
|
35
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
36
|
+
|
|
37
|
+
json_json_body = json_body.to_dict()
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
"method": "get",
|
|
41
|
+
"url": url,
|
|
42
|
+
"headers": headers,
|
|
43
|
+
"cookies": cookies,
|
|
44
|
+
"timeout": client.get_timeout(),
|
|
45
|
+
"json": json_json_body,
|
|
46
|
+
"params": params,
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _parse_response(*, response: httpx.Response) -> Optional[ExportSecretsResponse]:
|
|
51
|
+
if response.status_code == 200:
|
|
52
|
+
response_200 = ExportSecretsResponse.from_dict(response.json())
|
|
53
|
+
|
|
54
|
+
return response_200
|
|
55
|
+
return None
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _build_response(*, response: httpx.Response) -> Response[ExportSecretsResponse]:
|
|
59
|
+
return Response(
|
|
60
|
+
status_code=HTTPStatus(response.status_code),
|
|
61
|
+
content=response.content,
|
|
62
|
+
headers=response.headers,
|
|
63
|
+
parsed=_parse_response(response=response),
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def sync_detailed(
|
|
68
|
+
*,
|
|
69
|
+
client: AuthenticatedClient,
|
|
70
|
+
json_body: ExportUserSecretsParams,
|
|
71
|
+
environment: Union[Unset, None, str] = UNSET,
|
|
72
|
+
all_: Union[Unset, None, bool] = UNSET,
|
|
73
|
+
page: Union[Unset, None, int] = UNSET,
|
|
74
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
75
|
+
) -> Response[ExportSecretsResponse]:
|
|
76
|
+
"""Export secrets
|
|
77
|
+
|
|
78
|
+
Lists all the secrets in your current account and re-encrypt them with the public key you supplied.
|
|
79
|
+
|
|
80
|
+
Args:
|
|
81
|
+
environment (Union[Unset, None, str]): The environment to filter by.
|
|
82
|
+
all_ (Union[Unset, None, bool]): Whether to fetch all secrets or only the ones that are
|
|
83
|
+
not marked as deleted.
|
|
84
|
+
page (Union[Unset, None, int]): The page number to fetch.
|
|
85
|
+
page_size (Union[Unset, None, int]): The number of records to fetch on each page.
|
|
86
|
+
json_body (ExportUserSecretsParams):
|
|
87
|
+
|
|
88
|
+
Returns:
|
|
89
|
+
Response[ExportSecretsResponse]
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
kwargs = _get_kwargs(
|
|
93
|
+
client=client,
|
|
94
|
+
json_body=json_body,
|
|
95
|
+
environment=environment,
|
|
96
|
+
all_=all_,
|
|
97
|
+
page=page,
|
|
98
|
+
page_size=page_size,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
response = httpx.request(
|
|
102
|
+
verify=client.verify_ssl,
|
|
103
|
+
**kwargs,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
return _build_response(response=response)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def sync(
|
|
110
|
+
*,
|
|
111
|
+
client: AuthenticatedClient,
|
|
112
|
+
json_body: ExportUserSecretsParams,
|
|
113
|
+
environment: Union[Unset, None, str] = UNSET,
|
|
114
|
+
all_: Union[Unset, None, bool] = UNSET,
|
|
115
|
+
page: Union[Unset, None, int] = UNSET,
|
|
116
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
117
|
+
) -> Optional[ExportSecretsResponse]:
|
|
118
|
+
"""Export secrets
|
|
119
|
+
|
|
120
|
+
Lists all the secrets in your current account and re-encrypt them with the public key you supplied.
|
|
121
|
+
|
|
122
|
+
Args:
|
|
123
|
+
environment (Union[Unset, None, str]): The environment to filter by.
|
|
124
|
+
all_ (Union[Unset, None, bool]): Whether to fetch all secrets or only the ones that are
|
|
125
|
+
not marked as deleted.
|
|
126
|
+
page (Union[Unset, None, int]): The page number to fetch.
|
|
127
|
+
page_size (Union[Unset, None, int]): The number of records to fetch on each page.
|
|
128
|
+
json_body (ExportUserSecretsParams):
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
Response[ExportSecretsResponse]
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
return sync_detailed(
|
|
135
|
+
client=client,
|
|
136
|
+
json_body=json_body,
|
|
137
|
+
environment=environment,
|
|
138
|
+
all_=all_,
|
|
139
|
+
page=page,
|
|
140
|
+
page_size=page_size,
|
|
141
|
+
).parsed
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
async def asyncio_detailed(
|
|
145
|
+
*,
|
|
146
|
+
client: AuthenticatedClient,
|
|
147
|
+
json_body: ExportUserSecretsParams,
|
|
148
|
+
environment: Union[Unset, None, str] = UNSET,
|
|
149
|
+
all_: Union[Unset, None, bool] = UNSET,
|
|
150
|
+
page: Union[Unset, None, int] = UNSET,
|
|
151
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
152
|
+
) -> Response[ExportSecretsResponse]:
|
|
153
|
+
"""Export secrets
|
|
154
|
+
|
|
155
|
+
Lists all the secrets in your current account and re-encrypt them with the public key you supplied.
|
|
156
|
+
|
|
157
|
+
Args:
|
|
158
|
+
environment (Union[Unset, None, str]): The environment to filter by.
|
|
159
|
+
all_ (Union[Unset, None, bool]): Whether to fetch all secrets or only the ones that are
|
|
160
|
+
not marked as deleted.
|
|
161
|
+
page (Union[Unset, None, int]): The page number to fetch.
|
|
162
|
+
page_size (Union[Unset, None, int]): The number of records to fetch on each page.
|
|
163
|
+
json_body (ExportUserSecretsParams):
|
|
164
|
+
|
|
165
|
+
Returns:
|
|
166
|
+
Response[ExportSecretsResponse]
|
|
167
|
+
"""
|
|
168
|
+
|
|
169
|
+
kwargs = _get_kwargs(
|
|
170
|
+
client=client,
|
|
171
|
+
json_body=json_body,
|
|
172
|
+
environment=environment,
|
|
173
|
+
all_=all_,
|
|
174
|
+
page=page,
|
|
175
|
+
page_size=page_size,
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
179
|
+
response = await _client.request(**kwargs)
|
|
180
|
+
|
|
181
|
+
return _build_response(response=response)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
async def asyncio(
|
|
185
|
+
*,
|
|
186
|
+
client: AuthenticatedClient,
|
|
187
|
+
json_body: ExportUserSecretsParams,
|
|
188
|
+
environment: Union[Unset, None, str] = UNSET,
|
|
189
|
+
all_: Union[Unset, None, bool] = UNSET,
|
|
190
|
+
page: Union[Unset, None, int] = UNSET,
|
|
191
|
+
page_size: Union[Unset, None, int] = UNSET,
|
|
192
|
+
) -> Optional[ExportSecretsResponse]:
|
|
193
|
+
"""Export secrets
|
|
194
|
+
|
|
195
|
+
Lists all the secrets in your current account and re-encrypt them with the public key you supplied.
|
|
196
|
+
|
|
197
|
+
Args:
|
|
198
|
+
environment (Union[Unset, None, str]): The environment to filter by.
|
|
199
|
+
all_ (Union[Unset, None, bool]): Whether to fetch all secrets or only the ones that are
|
|
200
|
+
not marked as deleted.
|
|
201
|
+
page (Union[Unset, None, int]): The page number to fetch.
|
|
202
|
+
page_size (Union[Unset, None, int]): The number of records to fetch on each page.
|
|
203
|
+
json_body (ExportUserSecretsParams):
|
|
204
|
+
|
|
205
|
+
Returns:
|
|
206
|
+
Response[ExportSecretsResponse]
|
|
207
|
+
"""
|
|
208
|
+
|
|
209
|
+
return (
|
|
210
|
+
await asyncio_detailed(
|
|
211
|
+
client=client,
|
|
212
|
+
json_body=json_body,
|
|
213
|
+
environment=environment,
|
|
214
|
+
all_=all_,
|
|
215
|
+
page=page,
|
|
216
|
+
page_size=page_size,
|
|
217
|
+
)
|
|
218
|
+
).parsed
|
|
@@ -0,0 +1,129 @@
|
|
|
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.generate_app_statistics_response import GenerateAppStatisticsResponse
|
|
8
|
+
from ...types import Response
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
*,
|
|
13
|
+
client: AuthenticatedClient,
|
|
14
|
+
) -> Dict[str, Any]:
|
|
15
|
+
url = "{}/stats/apps".format(client.base_url)
|
|
16
|
+
|
|
17
|
+
headers: Dict[str, str] = client.get_headers()
|
|
18
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
"method": "get",
|
|
22
|
+
"url": url,
|
|
23
|
+
"headers": headers,
|
|
24
|
+
"cookies": cookies,
|
|
25
|
+
"timeout": client.get_timeout(),
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _parse_response(
|
|
30
|
+
*, response: httpx.Response
|
|
31
|
+
) -> Optional[GenerateAppStatisticsResponse]:
|
|
32
|
+
if response.status_code == 200:
|
|
33
|
+
response_200 = GenerateAppStatisticsResponse.from_dict(response.json())
|
|
34
|
+
|
|
35
|
+
return response_200
|
|
36
|
+
return None
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _build_response(
|
|
40
|
+
*, response: httpx.Response
|
|
41
|
+
) -> Response[GenerateAppStatisticsResponse]:
|
|
42
|
+
return Response(
|
|
43
|
+
status_code=HTTPStatus(response.status_code),
|
|
44
|
+
content=response.content,
|
|
45
|
+
headers=response.headers,
|
|
46
|
+
parsed=_parse_response(response=response),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def sync_detailed(
|
|
51
|
+
*,
|
|
52
|
+
client: AuthenticatedClient,
|
|
53
|
+
) -> Response[GenerateAppStatisticsResponse]:
|
|
54
|
+
"""Generate app statistics
|
|
55
|
+
|
|
56
|
+
Generates current statistics about apps
|
|
57
|
+
|
|
58
|
+
Returns:
|
|
59
|
+
Response[GenerateAppStatisticsResponse]
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
kwargs = _get_kwargs(
|
|
63
|
+
client=client,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
response = httpx.request(
|
|
67
|
+
verify=client.verify_ssl,
|
|
68
|
+
**kwargs,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
return _build_response(response=response)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def sync(
|
|
75
|
+
*,
|
|
76
|
+
client: AuthenticatedClient,
|
|
77
|
+
) -> Optional[GenerateAppStatisticsResponse]:
|
|
78
|
+
"""Generate app statistics
|
|
79
|
+
|
|
80
|
+
Generates current statistics about apps
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
Response[GenerateAppStatisticsResponse]
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
return sync_detailed(
|
|
87
|
+
client=client,
|
|
88
|
+
).parsed
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
async def asyncio_detailed(
|
|
92
|
+
*,
|
|
93
|
+
client: AuthenticatedClient,
|
|
94
|
+
) -> Response[GenerateAppStatisticsResponse]:
|
|
95
|
+
"""Generate app statistics
|
|
96
|
+
|
|
97
|
+
Generates current statistics about apps
|
|
98
|
+
|
|
99
|
+
Returns:
|
|
100
|
+
Response[GenerateAppStatisticsResponse]
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
kwargs = _get_kwargs(
|
|
104
|
+
client=client,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
108
|
+
response = await _client.request(**kwargs)
|
|
109
|
+
|
|
110
|
+
return _build_response(response=response)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
async def asyncio(
|
|
114
|
+
*,
|
|
115
|
+
client: AuthenticatedClient,
|
|
116
|
+
) -> Optional[GenerateAppStatisticsResponse]:
|
|
117
|
+
"""Generate app statistics
|
|
118
|
+
|
|
119
|
+
Generates current statistics about apps
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
Response[GenerateAppStatisticsResponse]
|
|
123
|
+
"""
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
await asyncio_detailed(
|
|
127
|
+
client=client,
|
|
128
|
+
)
|
|
129
|
+
).parsed
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ...client import AuthenticatedClient
|
|
7
|
+
from ...models.generate_run_statistics_response import GenerateRunStatisticsResponse
|
|
8
|
+
from ...types import UNSET, Response, Unset
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
*,
|
|
13
|
+
client: AuthenticatedClient,
|
|
14
|
+
period: Union[Unset, None, str] = "24h",
|
|
15
|
+
) -> Dict[str, Any]:
|
|
16
|
+
url = "{}/stats/runs".format(client.base_url)
|
|
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["period"] = period
|
|
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": "get",
|
|
28
|
+
"url": url,
|
|
29
|
+
"headers": headers,
|
|
30
|
+
"cookies": cookies,
|
|
31
|
+
"timeout": client.get_timeout(),
|
|
32
|
+
"params": params,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _parse_response(
|
|
37
|
+
*, response: httpx.Response
|
|
38
|
+
) -> Optional[GenerateRunStatisticsResponse]:
|
|
39
|
+
if response.status_code == 200:
|
|
40
|
+
response_200 = GenerateRunStatisticsResponse.from_dict(response.json())
|
|
41
|
+
|
|
42
|
+
return response_200
|
|
43
|
+
return None
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _build_response(
|
|
47
|
+
*, response: httpx.Response
|
|
48
|
+
) -> Response[GenerateRunStatisticsResponse]:
|
|
49
|
+
return Response(
|
|
50
|
+
status_code=HTTPStatus(response.status_code),
|
|
51
|
+
content=response.content,
|
|
52
|
+
headers=response.headers,
|
|
53
|
+
parsed=_parse_response(response=response),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def sync_detailed(
|
|
58
|
+
*,
|
|
59
|
+
client: AuthenticatedClient,
|
|
60
|
+
period: Union[Unset, None, str] = "24h",
|
|
61
|
+
) -> Response[GenerateRunStatisticsResponse]:
|
|
62
|
+
"""Generate run statistics
|
|
63
|
+
|
|
64
|
+
Generates statistics about runs over a specified time period.
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
period (Union[Unset, None, str]): Time period for statistics (24h, 7d, 30d) Default:
|
|
68
|
+
'24h'.
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
Response[GenerateRunStatisticsResponse]
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
kwargs = _get_kwargs(
|
|
75
|
+
client=client,
|
|
76
|
+
period=period,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
response = httpx.request(
|
|
80
|
+
verify=client.verify_ssl,
|
|
81
|
+
**kwargs,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
return _build_response(response=response)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def sync(
|
|
88
|
+
*,
|
|
89
|
+
client: AuthenticatedClient,
|
|
90
|
+
period: Union[Unset, None, str] = "24h",
|
|
91
|
+
) -> Optional[GenerateRunStatisticsResponse]:
|
|
92
|
+
"""Generate run statistics
|
|
93
|
+
|
|
94
|
+
Generates statistics about runs over a specified time period.
|
|
95
|
+
|
|
96
|
+
Args:
|
|
97
|
+
period (Union[Unset, None, str]): Time period for statistics (24h, 7d, 30d) Default:
|
|
98
|
+
'24h'.
|
|
99
|
+
|
|
100
|
+
Returns:
|
|
101
|
+
Response[GenerateRunStatisticsResponse]
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
return sync_detailed(
|
|
105
|
+
client=client,
|
|
106
|
+
period=period,
|
|
107
|
+
).parsed
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
async def asyncio_detailed(
|
|
111
|
+
*,
|
|
112
|
+
client: AuthenticatedClient,
|
|
113
|
+
period: Union[Unset, None, str] = "24h",
|
|
114
|
+
) -> Response[GenerateRunStatisticsResponse]:
|
|
115
|
+
"""Generate run statistics
|
|
116
|
+
|
|
117
|
+
Generates statistics about runs over a specified time period.
|
|
118
|
+
|
|
119
|
+
Args:
|
|
120
|
+
period (Union[Unset, None, str]): Time period for statistics (24h, 7d, 30d) Default:
|
|
121
|
+
'24h'.
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
Response[GenerateRunStatisticsResponse]
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
kwargs = _get_kwargs(
|
|
128
|
+
client=client,
|
|
129
|
+
period=period,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
133
|
+
response = await _client.request(**kwargs)
|
|
134
|
+
|
|
135
|
+
return _build_response(response=response)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
async def asyncio(
|
|
139
|
+
*,
|
|
140
|
+
client: AuthenticatedClient,
|
|
141
|
+
period: Union[Unset, None, str] = "24h",
|
|
142
|
+
) -> Optional[GenerateRunStatisticsResponse]:
|
|
143
|
+
"""Generate run statistics
|
|
144
|
+
|
|
145
|
+
Generates statistics about runs over a specified time period.
|
|
146
|
+
|
|
147
|
+
Args:
|
|
148
|
+
period (Union[Unset, None, str]): Time period for statistics (24h, 7d, 30d) Default:
|
|
149
|
+
'24h'.
|
|
150
|
+
|
|
151
|
+
Returns:
|
|
152
|
+
Response[GenerateRunStatisticsResponse]
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
await asyncio_detailed(
|
|
157
|
+
client=client,
|
|
158
|
+
period=period,
|
|
159
|
+
)
|
|
160
|
+
).parsed
|