fal 0.11.1__py3-none-any.whl → 0.11.3__py3-none-any.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.
Potentially problematic release.
This version of fal might be problematic. Click here for more details.
- fal/api.py +51 -19
- fal/auth/__init__.py +1 -2
- fal/auth/auth0.py +2 -5
- fal/cli.py +92 -108
- fal/rest_client.py +1 -0
- fal/sdk.py +49 -129
- fal/sync.py +3 -2
- fal/toolkit/file/file.py +6 -5
- fal/toolkit/file/providers/gcp.py +4 -1
- fal/toolkit/file/providers/r2.py +83 -0
- fal/toolkit/file/types.py +1 -1
- fal/toolkit/image/image.py +2 -2
- fal/toolkit/utils/download_utils.py +1 -1
- {fal-0.11.1.dist-info → fal-0.11.3.dist-info}/METADATA +40 -3
- {fal-0.11.1.dist-info → fal-0.11.3.dist-info}/RECORD +58 -44
- openapi_fal_rest/api/admin/get_usage_per_user.py +199 -0
- openapi_fal_rest/api/admin/handle_user_lock.py +6 -2
- openapi_fal_rest/api/applications/get_status_applications_app_user_id_app_alias_or_id_status_get.py +6 -2
- openapi_fal_rest/api/billing/delete_payment_method.py +9 -3
- openapi_fal_rest/api/billing/get_setup_intent_key.py +6 -2
- openapi_fal_rest/api/billing/get_user_price.py +6 -2
- openapi_fal_rest/api/billing/get_user_spending.py +6 -2
- openapi_fal_rest/api/billing/handle_stripe_webhook.py +21 -7
- openapi_fal_rest/api/billing/upcoming_invoice.py +6 -2
- openapi_fal_rest/api/billing/update_customer_budget.py +6 -2
- openapi_fal_rest/api/files/check_dir_hash.py +9 -3
- openapi_fal_rest/api/files/delete.py +6 -2
- openapi_fal_rest/api/files/download.py +6 -2
- openapi_fal_rest/api/files/file_exists.py +6 -2
- openapi_fal_rest/api/files/upload_from_url.py +6 -2
- openapi_fal_rest/api/files/upload_local_file.py +9 -3
- openapi_fal_rest/api/keys/create_key.py +6 -2
- openapi_fal_rest/api/keys/delete_key.py +6 -2
- openapi_fal_rest/api/{usage/get_request_stats_by_time.py → requests/requests.py} +33 -18
- openapi_fal_rest/api/storage/get_file_link.py +200 -0
- openapi_fal_rest/api/storage/initiate_upload.py +172 -0
- openapi_fal_rest/api/tokens/__init__.py +0 -0
- openapi_fal_rest/api/{application/get_status_application_status_user_id_alias_get.py → tokens/create_token.py} +41 -48
- openapi_fal_rest/api/usage/get_gateway_request_stats.py +49 -1
- openapi_fal_rest/api/usage/get_gateway_request_stats_by_time.py +270 -0
- openapi_fal_rest/api/usage/per_machine_usage_details.py +3 -1
- openapi_fal_rest/models/__init__.py +18 -0
- openapi_fal_rest/models/body_create_token.py +68 -0
- openapi_fal_rest/models/body_upload_file.py +4 -1
- openapi_fal_rest/models/body_upload_local_file.py +4 -1
- openapi_fal_rest/models/gateway_stats_by_time.py +27 -27
- openapi_fal_rest/models/gateway_usage_stats.py +58 -31
- openapi_fal_rest/models/get_gateway_request_stats_by_time_response_get_gateway_request_stats_by_time.py +80 -0
- openapi_fal_rest/models/initiate_upload_info.py +64 -0
- openapi_fal_rest/models/presigned_upload_url.py +64 -0
- openapi_fal_rest/models/request_io.py +112 -0
- openapi_fal_rest/models/request_io_json_input.py +43 -0
- openapi_fal_rest/models/request_io_json_output.py +43 -0
- openapi_fal_rest/models/stats_timeframe.py +1 -0
- openapi_fal_rest/models/usage_per_user.py +71 -0
- {fal-0.11.1.dist-info → fal-0.11.3.dist-info}/WHEEL +0 -0
- {fal-0.11.1.dist-info → fal-0.11.3.dist-info}/entry_points.txt +0 -0
- /openapi_fal_rest/api/{application → requests}/__init__.py +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import Client
|
|
8
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...models.initiate_upload_info import InitiateUploadInfo
|
|
10
|
+
from ...models.presigned_upload_url import PresignedUploadUrl
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
client: Client,
|
|
17
|
+
json_body: InitiateUploadInfo,
|
|
18
|
+
) -> Dict[str, Any]:
|
|
19
|
+
url = "{}/storage/upload/initiate".format(client.base_url)
|
|
20
|
+
|
|
21
|
+
headers: Dict[str, str] = client.get_headers()
|
|
22
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
23
|
+
|
|
24
|
+
json_json_body = json_body.to_dict()
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
"method": "post",
|
|
28
|
+
"url": url,
|
|
29
|
+
"headers": headers,
|
|
30
|
+
"cookies": cookies,
|
|
31
|
+
"timeout": client.get_timeout(),
|
|
32
|
+
"follow_redirects": client.follow_redirects,
|
|
33
|
+
"json": json_json_body,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _parse_response(
|
|
38
|
+
*, client: Client, response: httpx.Response
|
|
39
|
+
) -> Optional[Union[HTTPValidationError, PresignedUploadUrl]]:
|
|
40
|
+
if response.status_code == HTTPStatus.OK:
|
|
41
|
+
response_200 = PresignedUploadUrl.from_dict(response.json())
|
|
42
|
+
|
|
43
|
+
return response_200
|
|
44
|
+
if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY:
|
|
45
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
46
|
+
|
|
47
|
+
return response_422
|
|
48
|
+
if client.raise_on_unexpected_status:
|
|
49
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
50
|
+
else:
|
|
51
|
+
return None
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _build_response(
|
|
55
|
+
*, client: Client, response: httpx.Response
|
|
56
|
+
) -> Response[Union[HTTPValidationError, PresignedUploadUrl]]:
|
|
57
|
+
return Response(
|
|
58
|
+
status_code=HTTPStatus(response.status_code),
|
|
59
|
+
content=response.content,
|
|
60
|
+
headers=response.headers,
|
|
61
|
+
parsed=_parse_response(client=client, response=response),
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def sync_detailed(
|
|
66
|
+
*,
|
|
67
|
+
client: Client,
|
|
68
|
+
json_body: InitiateUploadInfo,
|
|
69
|
+
) -> Response[Union[HTTPValidationError, PresignedUploadUrl]]:
|
|
70
|
+
"""Initiate Upload
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
json_body (InitiateUploadInfo):
|
|
74
|
+
|
|
75
|
+
Raises:
|
|
76
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
77
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
78
|
+
|
|
79
|
+
Returns:
|
|
80
|
+
Response[Union[HTTPValidationError, PresignedUploadUrl]]
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
kwargs = _get_kwargs(
|
|
84
|
+
client=client,
|
|
85
|
+
json_body=json_body,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
response = httpx.request(
|
|
89
|
+
verify=client.verify_ssl,
|
|
90
|
+
**kwargs,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
return _build_response(client=client, response=response)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def sync(
|
|
97
|
+
*,
|
|
98
|
+
client: Client,
|
|
99
|
+
json_body: InitiateUploadInfo,
|
|
100
|
+
) -> Optional[Union[HTTPValidationError, PresignedUploadUrl]]:
|
|
101
|
+
"""Initiate Upload
|
|
102
|
+
|
|
103
|
+
Args:
|
|
104
|
+
json_body (InitiateUploadInfo):
|
|
105
|
+
|
|
106
|
+
Raises:
|
|
107
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
108
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
Union[HTTPValidationError, PresignedUploadUrl]
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
return sync_detailed(
|
|
115
|
+
client=client,
|
|
116
|
+
json_body=json_body,
|
|
117
|
+
).parsed
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
async def asyncio_detailed(
|
|
121
|
+
*,
|
|
122
|
+
client: Client,
|
|
123
|
+
json_body: InitiateUploadInfo,
|
|
124
|
+
) -> Response[Union[HTTPValidationError, PresignedUploadUrl]]:
|
|
125
|
+
"""Initiate Upload
|
|
126
|
+
|
|
127
|
+
Args:
|
|
128
|
+
json_body (InitiateUploadInfo):
|
|
129
|
+
|
|
130
|
+
Raises:
|
|
131
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
132
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
133
|
+
|
|
134
|
+
Returns:
|
|
135
|
+
Response[Union[HTTPValidationError, PresignedUploadUrl]]
|
|
136
|
+
"""
|
|
137
|
+
|
|
138
|
+
kwargs = _get_kwargs(
|
|
139
|
+
client=client,
|
|
140
|
+
json_body=json_body,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
144
|
+
response = await _client.request(**kwargs)
|
|
145
|
+
|
|
146
|
+
return _build_response(client=client, response=response)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
async def asyncio(
|
|
150
|
+
*,
|
|
151
|
+
client: Client,
|
|
152
|
+
json_body: InitiateUploadInfo,
|
|
153
|
+
) -> Optional[Union[HTTPValidationError, PresignedUploadUrl]]:
|
|
154
|
+
"""Initiate Upload
|
|
155
|
+
|
|
156
|
+
Args:
|
|
157
|
+
json_body (InitiateUploadInfo):
|
|
158
|
+
|
|
159
|
+
Raises:
|
|
160
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
161
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
162
|
+
|
|
163
|
+
Returns:
|
|
164
|
+
Union[HTTPValidationError, PresignedUploadUrl]
|
|
165
|
+
"""
|
|
166
|
+
|
|
167
|
+
return (
|
|
168
|
+
await asyncio_detailed(
|
|
169
|
+
client=client,
|
|
170
|
+
json_body=json_body,
|
|
171
|
+
)
|
|
172
|
+
).parsed
|
|
File without changes
|
|
@@ -1,41 +1,44 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Dict, Optional, Union
|
|
2
|
+
from typing import Any, Dict, Optional, Union, cast
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import Client
|
|
8
|
+
from ...models.body_create_token import BodyCreateToken
|
|
8
9
|
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
-
from ...models.status import Status
|
|
10
10
|
from ...types import Response
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def _get_kwargs(
|
|
14
|
-
user_id: str,
|
|
15
|
-
alias: str,
|
|
16
14
|
*,
|
|
17
15
|
client: Client,
|
|
16
|
+
json_body: BodyCreateToken,
|
|
18
17
|
) -> Dict[str, Any]:
|
|
19
|
-
url = "{}/
|
|
18
|
+
url = "{}/tokens/".format(client.base_url)
|
|
20
19
|
|
|
21
20
|
headers: Dict[str, str] = client.get_headers()
|
|
22
21
|
cookies: Dict[str, Any] = client.get_cookies()
|
|
23
22
|
|
|
23
|
+
json_json_body = json_body.to_dict()
|
|
24
|
+
|
|
24
25
|
return {
|
|
25
|
-
"method": "
|
|
26
|
+
"method": "post",
|
|
26
27
|
"url": url,
|
|
27
28
|
"headers": headers,
|
|
28
29
|
"cookies": cookies,
|
|
29
30
|
"timeout": client.get_timeout(),
|
|
30
31
|
"follow_redirects": client.follow_redirects,
|
|
32
|
+
"json": json_json_body,
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
|
|
34
|
-
def _parse_response(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
def _parse_response(
|
|
37
|
+
*, client: Client, response: httpx.Response
|
|
38
|
+
) -> Optional[Union[HTTPValidationError, str]]:
|
|
39
|
+
if response.status_code == HTTPStatus.CREATED:
|
|
40
|
+
response_201 = cast(str, response.json())
|
|
41
|
+
return response_201
|
|
39
42
|
if response.status_code == HTTPStatus.UNPROCESSABLE_ENTITY:
|
|
40
43
|
response_422 = HTTPValidationError.from_dict(response.json())
|
|
41
44
|
|
|
@@ -46,7 +49,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Uni
|
|
|
46
49
|
return None
|
|
47
50
|
|
|
48
51
|
|
|
49
|
-
def _build_response(
|
|
52
|
+
def _build_response(
|
|
53
|
+
*, client: Client, response: httpx.Response
|
|
54
|
+
) -> Response[Union[HTTPValidationError, str]]:
|
|
50
55
|
return Response(
|
|
51
56
|
status_code=HTTPStatus(response.status_code),
|
|
52
57
|
content=response.content,
|
|
@@ -56,29 +61,26 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[Uni
|
|
|
56
61
|
|
|
57
62
|
|
|
58
63
|
def sync_detailed(
|
|
59
|
-
user_id: str,
|
|
60
|
-
alias: str,
|
|
61
64
|
*,
|
|
62
65
|
client: Client,
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
json_body: BodyCreateToken,
|
|
67
|
+
) -> Response[Union[HTTPValidationError, str]]:
|
|
68
|
+
"""Create Token
|
|
65
69
|
|
|
66
70
|
Args:
|
|
67
|
-
|
|
68
|
-
alias (str):
|
|
71
|
+
json_body (BodyCreateToken):
|
|
69
72
|
|
|
70
73
|
Raises:
|
|
71
74
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
72
75
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
73
76
|
|
|
74
77
|
Returns:
|
|
75
|
-
Response[Union[HTTPValidationError,
|
|
78
|
+
Response[Union[HTTPValidationError, str]]
|
|
76
79
|
"""
|
|
77
80
|
|
|
78
81
|
kwargs = _get_kwargs(
|
|
79
|
-
user_id=user_id,
|
|
80
|
-
alias=alias,
|
|
81
82
|
client=client,
|
|
83
|
+
json_body=json_body,
|
|
82
84
|
)
|
|
83
85
|
|
|
84
86
|
response = httpx.request(
|
|
@@ -90,56 +92,50 @@ def sync_detailed(
|
|
|
90
92
|
|
|
91
93
|
|
|
92
94
|
def sync(
|
|
93
|
-
user_id: str,
|
|
94
|
-
alias: str,
|
|
95
95
|
*,
|
|
96
96
|
client: Client,
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
json_body: BodyCreateToken,
|
|
98
|
+
) -> Optional[Union[HTTPValidationError, str]]:
|
|
99
|
+
"""Create Token
|
|
99
100
|
|
|
100
101
|
Args:
|
|
101
|
-
|
|
102
|
-
alias (str):
|
|
102
|
+
json_body (BodyCreateToken):
|
|
103
103
|
|
|
104
104
|
Raises:
|
|
105
105
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
106
106
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
107
107
|
|
|
108
108
|
Returns:
|
|
109
|
-
Union[HTTPValidationError,
|
|
109
|
+
Union[HTTPValidationError, str]
|
|
110
110
|
"""
|
|
111
111
|
|
|
112
112
|
return sync_detailed(
|
|
113
|
-
user_id=user_id,
|
|
114
|
-
alias=alias,
|
|
115
113
|
client=client,
|
|
114
|
+
json_body=json_body,
|
|
116
115
|
).parsed
|
|
117
116
|
|
|
118
117
|
|
|
119
118
|
async def asyncio_detailed(
|
|
120
|
-
user_id: str,
|
|
121
|
-
alias: str,
|
|
122
119
|
*,
|
|
123
120
|
client: Client,
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
json_body: BodyCreateToken,
|
|
122
|
+
) -> Response[Union[HTTPValidationError, str]]:
|
|
123
|
+
"""Create Token
|
|
126
124
|
|
|
127
125
|
Args:
|
|
128
|
-
|
|
129
|
-
alias (str):
|
|
126
|
+
json_body (BodyCreateToken):
|
|
130
127
|
|
|
131
128
|
Raises:
|
|
132
129
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
133
130
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
134
131
|
|
|
135
132
|
Returns:
|
|
136
|
-
Response[Union[HTTPValidationError,
|
|
133
|
+
Response[Union[HTTPValidationError, str]]
|
|
137
134
|
"""
|
|
138
135
|
|
|
139
136
|
kwargs = _get_kwargs(
|
|
140
|
-
user_id=user_id,
|
|
141
|
-
alias=alias,
|
|
142
137
|
client=client,
|
|
138
|
+
json_body=json_body,
|
|
143
139
|
)
|
|
144
140
|
|
|
145
141
|
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
@@ -149,29 +145,26 @@ async def asyncio_detailed(
|
|
|
149
145
|
|
|
150
146
|
|
|
151
147
|
async def asyncio(
|
|
152
|
-
user_id: str,
|
|
153
|
-
alias: str,
|
|
154
148
|
*,
|
|
155
149
|
client: Client,
|
|
156
|
-
|
|
157
|
-
|
|
150
|
+
json_body: BodyCreateToken,
|
|
151
|
+
) -> Optional[Union[HTTPValidationError, str]]:
|
|
152
|
+
"""Create Token
|
|
158
153
|
|
|
159
154
|
Args:
|
|
160
|
-
|
|
161
|
-
alias (str):
|
|
155
|
+
json_body (BodyCreateToken):
|
|
162
156
|
|
|
163
157
|
Raises:
|
|
164
158
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
165
159
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
166
160
|
|
|
167
161
|
Returns:
|
|
168
|
-
Union[HTTPValidationError,
|
|
162
|
+
Union[HTTPValidationError, str]
|
|
169
163
|
"""
|
|
170
164
|
|
|
171
165
|
return (
|
|
172
166
|
await asyncio_detailed(
|
|
173
|
-
user_id=user_id,
|
|
174
|
-
alias=alias,
|
|
175
167
|
client=client,
|
|
168
|
+
json_body=json_body,
|
|
176
169
|
)
|
|
177
170
|
).parsed
|
|
@@ -8,7 +8,8 @@ from ... import errors
|
|
|
8
8
|
from ...client import Client
|
|
9
9
|
from ...models.gateway_usage_stats import GatewayUsageStats
|
|
10
10
|
from ...models.http_validation_error import HTTPValidationError
|
|
11
|
-
from ...
|
|
11
|
+
from ...models.stats_timeframe import StatsTimeframe
|
|
12
|
+
from ...types import UNSET, Response, Unset
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
def _get_kwargs(
|
|
@@ -16,6 +17,9 @@ def _get_kwargs(
|
|
|
16
17
|
client: Client,
|
|
17
18
|
start_time: datetime.datetime,
|
|
18
19
|
end_time: datetime.datetime,
|
|
20
|
+
timeframe: StatsTimeframe,
|
|
21
|
+
get_stats_by_time: Union[Unset, None, bool] = True,
|
|
22
|
+
app_alias: Union[Unset, None, str] = UNSET,
|
|
19
23
|
) -> Dict[str, Any]:
|
|
20
24
|
url = "{}/usage/stats/app".format(client.base_url)
|
|
21
25
|
|
|
@@ -31,6 +35,14 @@ def _get_kwargs(
|
|
|
31
35
|
|
|
32
36
|
params["end_time"] = json_end_time
|
|
33
37
|
|
|
38
|
+
json_timeframe = timeframe.value
|
|
39
|
+
|
|
40
|
+
params["timeframe"] = json_timeframe
|
|
41
|
+
|
|
42
|
+
params["get_stats_by_time"] = get_stats_by_time
|
|
43
|
+
|
|
44
|
+
params["app_alias"] = app_alias
|
|
45
|
+
|
|
34
46
|
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
35
47
|
|
|
36
48
|
return {
|
|
@@ -82,12 +94,18 @@ def sync_detailed(
|
|
|
82
94
|
client: Client,
|
|
83
95
|
start_time: datetime.datetime,
|
|
84
96
|
end_time: datetime.datetime,
|
|
97
|
+
timeframe: StatsTimeframe,
|
|
98
|
+
get_stats_by_time: Union[Unset, None, bool] = True,
|
|
99
|
+
app_alias: Union[Unset, None, str] = UNSET,
|
|
85
100
|
) -> Response[Union[HTTPValidationError, List["GatewayUsageStats"]]]:
|
|
86
101
|
"""Get Gateway Request Stats
|
|
87
102
|
|
|
88
103
|
Args:
|
|
89
104
|
start_time (datetime.datetime):
|
|
90
105
|
end_time (datetime.datetime):
|
|
106
|
+
timeframe (StatsTimeframe): An enumeration.
|
|
107
|
+
get_stats_by_time (Union[Unset, None, bool]): Default: True.
|
|
108
|
+
app_alias (Union[Unset, None, str]):
|
|
91
109
|
|
|
92
110
|
Raises:
|
|
93
111
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -101,6 +119,9 @@ def sync_detailed(
|
|
|
101
119
|
client=client,
|
|
102
120
|
start_time=start_time,
|
|
103
121
|
end_time=end_time,
|
|
122
|
+
timeframe=timeframe,
|
|
123
|
+
get_stats_by_time=get_stats_by_time,
|
|
124
|
+
app_alias=app_alias,
|
|
104
125
|
)
|
|
105
126
|
|
|
106
127
|
response = httpx.request(
|
|
@@ -116,12 +137,18 @@ def sync(
|
|
|
116
137
|
client: Client,
|
|
117
138
|
start_time: datetime.datetime,
|
|
118
139
|
end_time: datetime.datetime,
|
|
140
|
+
timeframe: StatsTimeframe,
|
|
141
|
+
get_stats_by_time: Union[Unset, None, bool] = True,
|
|
142
|
+
app_alias: Union[Unset, None, str] = UNSET,
|
|
119
143
|
) -> Optional[Union[HTTPValidationError, List["GatewayUsageStats"]]]:
|
|
120
144
|
"""Get Gateway Request Stats
|
|
121
145
|
|
|
122
146
|
Args:
|
|
123
147
|
start_time (datetime.datetime):
|
|
124
148
|
end_time (datetime.datetime):
|
|
149
|
+
timeframe (StatsTimeframe): An enumeration.
|
|
150
|
+
get_stats_by_time (Union[Unset, None, bool]): Default: True.
|
|
151
|
+
app_alias (Union[Unset, None, str]):
|
|
125
152
|
|
|
126
153
|
Raises:
|
|
127
154
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -135,6 +162,9 @@ def sync(
|
|
|
135
162
|
client=client,
|
|
136
163
|
start_time=start_time,
|
|
137
164
|
end_time=end_time,
|
|
165
|
+
timeframe=timeframe,
|
|
166
|
+
get_stats_by_time=get_stats_by_time,
|
|
167
|
+
app_alias=app_alias,
|
|
138
168
|
).parsed
|
|
139
169
|
|
|
140
170
|
|
|
@@ -143,12 +173,18 @@ async def asyncio_detailed(
|
|
|
143
173
|
client: Client,
|
|
144
174
|
start_time: datetime.datetime,
|
|
145
175
|
end_time: datetime.datetime,
|
|
176
|
+
timeframe: StatsTimeframe,
|
|
177
|
+
get_stats_by_time: Union[Unset, None, bool] = True,
|
|
178
|
+
app_alias: Union[Unset, None, str] = UNSET,
|
|
146
179
|
) -> Response[Union[HTTPValidationError, List["GatewayUsageStats"]]]:
|
|
147
180
|
"""Get Gateway Request Stats
|
|
148
181
|
|
|
149
182
|
Args:
|
|
150
183
|
start_time (datetime.datetime):
|
|
151
184
|
end_time (datetime.datetime):
|
|
185
|
+
timeframe (StatsTimeframe): An enumeration.
|
|
186
|
+
get_stats_by_time (Union[Unset, None, bool]): Default: True.
|
|
187
|
+
app_alias (Union[Unset, None, str]):
|
|
152
188
|
|
|
153
189
|
Raises:
|
|
154
190
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -162,6 +198,9 @@ async def asyncio_detailed(
|
|
|
162
198
|
client=client,
|
|
163
199
|
start_time=start_time,
|
|
164
200
|
end_time=end_time,
|
|
201
|
+
timeframe=timeframe,
|
|
202
|
+
get_stats_by_time=get_stats_by_time,
|
|
203
|
+
app_alias=app_alias,
|
|
165
204
|
)
|
|
166
205
|
|
|
167
206
|
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
@@ -175,12 +214,18 @@ async def asyncio(
|
|
|
175
214
|
client: Client,
|
|
176
215
|
start_time: datetime.datetime,
|
|
177
216
|
end_time: datetime.datetime,
|
|
217
|
+
timeframe: StatsTimeframe,
|
|
218
|
+
get_stats_by_time: Union[Unset, None, bool] = True,
|
|
219
|
+
app_alias: Union[Unset, None, str] = UNSET,
|
|
178
220
|
) -> Optional[Union[HTTPValidationError, List["GatewayUsageStats"]]]:
|
|
179
221
|
"""Get Gateway Request Stats
|
|
180
222
|
|
|
181
223
|
Args:
|
|
182
224
|
start_time (datetime.datetime):
|
|
183
225
|
end_time (datetime.datetime):
|
|
226
|
+
timeframe (StatsTimeframe): An enumeration.
|
|
227
|
+
get_stats_by_time (Union[Unset, None, bool]): Default: True.
|
|
228
|
+
app_alias (Union[Unset, None, str]):
|
|
184
229
|
|
|
185
230
|
Raises:
|
|
186
231
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -195,5 +240,8 @@ async def asyncio(
|
|
|
195
240
|
client=client,
|
|
196
241
|
start_time=start_time,
|
|
197
242
|
end_time=end_time,
|
|
243
|
+
timeframe=timeframe,
|
|
244
|
+
get_stats_by_time=get_stats_by_time,
|
|
245
|
+
app_alias=app_alias,
|
|
198
246
|
)
|
|
199
247
|
).parsed
|