skyflow-flowvault-python 1.0.0__py3-none-any.whl → 1.1.0__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.
- common/generated/rest/__init__.py +225 -9
- common/generated/rest/_default_clients.py +32 -0
- common/generated/rest/authentication/client.py +23 -23
- common/generated/rest/authentication/raw_client.py +65 -31
- common/generated/rest/client.py +282 -12
- common/generated/rest/core/__init__.py +95 -20
- common/generated/rest/core/client_wrapper.py +65 -3
- common/generated/rest/core/datetime_utils.py +42 -0
- common/generated/rest/core/force_multipart.py +4 -2
- common/generated/rest/core/http_client.py +549 -152
- common/generated/rest/core/http_response.py +10 -2
- common/generated/rest/core/http_sse/__init__.py +42 -0
- common/generated/rest/core/http_sse/_api.py +455 -0
- common/generated/rest/core/http_sse/_decoders.py +74 -0
- common/generated/rest/core/http_sse/_exceptions.py +7 -0
- common/generated/rest/core/http_sse/_models.py +17 -0
- common/generated/rest/core/jsonable_encoder.py +33 -0
- common/generated/rest/core/logging.py +107 -0
- common/generated/rest/core/parse_error.py +36 -0
- common/generated/rest/core/pydantic_utilities.py +249 -18
- common/generated/rest/core/request_options.py +6 -1
- common/generated/rest/core/serialization.py +79 -8
- common/generated/rest/environment.py +2 -2
- common/generated/rest/errors/__init__.py +37 -4
- common/generated/rest/errors/bad_request_error.py +2 -5
- common/generated/rest/errors/internal_server_error.py +11 -0
- common/generated/rest/errors/not_found_error.py +2 -5
- common/generated/rest/errors/unauthorized_error.py +2 -5
- common/generated/rest/files_v2/__init__.py +49 -0
- common/generated/rest/files_v2/client.py +515 -0
- common/generated/rest/files_v2/raw_client.py +634 -0
- common/generated/rest/files_v2/types/__init__.py +47 -0
- common/generated/rest/files_v2/types/deidentify_file_request_v2data_format.py +32 -0
- common/generated/rest/files_v2/types/deidentify_file_request_v2data_source.py +5 -0
- common/generated/rest/files_v2/types/reidentify_file_request_v2data_format.py +7 -0
- common/generated/rest/files_v2/types/reidentify_file_request_v2data_source.py +5 -0
- common/generated/rest/guardrails_v2/__init__.py +4 -0
- common/generated/rest/guardrails_v2/client.py +165 -0
- common/generated/rest/guardrails_v2/raw_client.py +232 -0
- common/generated/rest/raw_client.py +86 -0
- common/generated/rest/strings_v2/__init__.py +4 -0
- common/generated/rest/strings_v2/client.py +344 -0
- common/generated/rest/strings_v2/raw_client.py +424 -0
- common/generated/rest/token_exchange/__init__.py +4 -0
- common/generated/rest/token_exchange/client.py +161 -0
- common/generated/rest/token_exchange/raw_client.py +251 -0
- common/generated/rest/types/__init__.py +183 -4
- common/generated/rest/types/audio_v2.py +51 -0
- common/generated/rest/types/audio_v2bleep.py +57 -0
- common/generated/rest/types/audio_v2output_transcription.py +10 -0
- common/generated/rest/types/{v_1_get_auth_token_response.py → deidentify_file_response_v2.py} +8 -9
- common/generated/rest/types/deidentify_string_response_v2.py +41 -0
- common/generated/rest/types/deidentify_string_response_v2detected_entity.py +53 -0
- common/generated/rest/types/deidentify_string_response_v2entity_location.py +65 -0
- common/generated/rest/types/detect.py +72 -0
- common/generated/rest/types/detect_config_v2.py +79 -0
- common/generated/rest/types/detect_config_v2vault_type.py +5 -0
- common/generated/rest/types/detect_custom_types.py +76 -0
- common/generated/rest/types/detect_custom_types_deidentification_type.py +7 -0
- common/generated/rest/types/detect_custom_types_include_prefix.py +5 -0
- common/generated/rest/types/detect_entity.py +78 -0
- common/generated/rest/types/detect_entity_deidentification_type.py +7 -0
- common/generated/rest/types/detect_entity_entity_type.py +80 -0
- common/generated/rest/types/detect_entity_include_prefix.py +5 -0
- common/generated/rest/types/detect_guardrails_response_v2.py +48 -0
- common/generated/rest/types/detect_guardrails_response_v2validation.py +5 -0
- common/generated/rest/types/detect_object_entity.py +43 -0
- common/generated/rest/types/detect_object_entity_deidentification_type.py +5 -0
- common/generated/rest/types/detect_object_entity_entity_type.py +7 -0
- common/generated/rest/types/detect_return_entities.py +5 -0
- common/generated/rest/types/detect_runs_response_v2.py +56 -0
- common/generated/rest/types/detect_runs_response_v2output_type.py +5 -0
- common/generated/rest/types/detect_runs_response_v2status.py +7 -0
- common/generated/rest/types/{protobuf_any.py → document_v2.py} +7 -4
- common/generated/rest/types/document_v2pdf.py +53 -0
- common/generated/rest/types/document_v2pdf_processing_mode.py +5 -0
- common/generated/rest/types/entity_transformation.py +28 -0
- common/generated/rest/types/{googlerpc_status.py → error_response.py} +3 -5
- common/generated/rest/types/error_response_error.py +28 -0
- common/generated/rest/types/file_mapping.py +69 -0
- common/generated/rest/types/file_output.py +52 -0
- common/generated/rest/types/file_output_processed_file_extension.py +32 -0
- common/generated/rest/types/file_output_processed_file_type.py +17 -0
- common/generated/rest/types/get_auth_token_response.py +37 -0
- common/generated/rest/types/get_sts_token_response.py +46 -0
- common/generated/rest/types/http_code.py +6 -0
- common/generated/rest/types/image_v2.py +54 -0
- common/generated/rest/types/image_v2masking_method.py +5 -0
- common/generated/rest/types/media.py +28 -0
- common/generated/rest/types/metrics.py +61 -0
- common/generated/rest/types/redaction_level.py +73 -0
- common/generated/rest/types/redaction_level_entity_name.py +80 -0
- common/generated/rest/types/redaction_level_redaction_type.py +5 -0
- common/generated/rest/types/reidentify_file_response_v2.py +51 -0
- common/generated/rest/types/reidentify_file_response_v2output_type.py +5 -0
- common/generated/rest/types/reidentify_file_response_v2status.py +7 -0
- common/generated/rest/types/reidentify_string_response_v2.py +35 -0
- common/generated/rest/types/transformation_shift_dates.py +41 -0
- common/generated/rest/version.py +6 -6
- common/service_account/_utils.py +2 -2
- common/utils/_skyflow_messages.py +80 -5
- common/utils/_utils.py +1 -1
- common/utils/enums/detect.py +180 -0
- common/utils/logger/_logger.py +11 -12
- common/utils/validations/_validations.py +2 -2
- common/vault/data/__init__.py +8 -0
- common/vault/data/_base_delete_files_request.py +3 -0
- common/vault/data/_base_delete_files_response.py +9 -0
- common/vault/data/_base_get_tokens_request.py +3 -0
- common/vault/data/_base_get_tokens_response.py +9 -0
- common/vault/data/_base_query_request.py +3 -0
- common/vault/data/_base_query_response.py +9 -0
- common/vault/data/_base_upload_files_request.py +3 -0
- common/vault/data/_base_upload_files_response.py +9 -0
- common/vault/detect/__init__.py +73 -0
- common/vault/detect/_constants.py +36 -0
- common/vault/detect/_controller.py +228 -0
- common/vault/detect/_errors.py +61 -0
- common/vault/detect/_file_flow.py +21 -0
- common/vault/detect/_file_output_writer.py +89 -0
- common/vault/detect/_mappers.py +331 -0
- common/vault/detect/_models.py +336 -0
- common/vault/detect/_polling.py +56 -0
- common/vault/detect/_validations.py +91 -0
- skyflow/client/skyflow.py +2 -0
- skyflow/generated/rest/__init__.py +24 -1
- skyflow/generated/rest/client.py +19 -0
- skyflow/generated/rest/core/client_wrapper.py +1 -1
- skyflow/generated/rest/files/__init__.py +4 -0
- skyflow/generated/rest/files/client.py +270 -0
- skyflow/generated/rest/files/raw_client.py +541 -0
- skyflow/generated/rest/types/__init__.py +21 -0
- skyflow/generated/rest/types/file_delete_record.py +56 -0
- skyflow/generated/rest/types/file_delete_response.py +23 -0
- skyflow/generated/rest/types/file_delete_response_object.py +59 -0
- skyflow/generated/rest/types/file_upload_column.py +36 -0
- skyflow/generated/rest/types/file_upload_record.py +44 -0
- skyflow/generated/rest/types/file_upload_response.py +23 -0
- skyflow/generated/rest/types/file_upload_response_object.py +59 -0
- skyflow/utils/_skyflow_messages.py +47 -0
- skyflow/utils/_version.py +1 -1
- skyflow/utils/enums/__init__.py +19 -0
- skyflow/utils/enums/_deidentify_source_type.py +6 -0
- skyflow/utils/enums/_file_upload_status.py +7 -0
- skyflow/utils/enums/_reidentify_source_type.py +6 -0
- skyflow/utils/validations/__init__.py +4 -0
- skyflow/utils/validations/_validations.py +78 -1
- skyflow/vault/client/client.py +82 -21
- skyflow/vault/controller/_vault.py +385 -21
- skyflow/vault/data/__init__.py +23 -0
- skyflow/vault/data/_delete_files_column_result.py +10 -0
- skyflow/vault/data/_delete_files_options.py +8 -0
- skyflow/vault/data/_delete_files_request.py +9 -0
- skyflow/vault/data/_delete_files_request_record.py +9 -0
- skyflow/vault/data/_delete_files_response.py +6 -0
- skyflow/vault/data/_delete_files_response_record.py +15 -0
- skyflow/vault/data/_get_tokens_options.py +8 -0
- skyflow/vault/data/_get_tokens_request.py +9 -0
- skyflow/vault/data/_get_tokens_request_record.py +4 -0
- skyflow/vault/data/_get_tokens_response.py +6 -0
- skyflow/vault/data/_get_tokens_response_record.py +15 -0
- skyflow/vault/data/_query_options.py +8 -0
- skyflow/vault/data/_query_request.py +6 -0
- skyflow/vault/data/_query_response.py +14 -0
- skyflow/vault/data/_query_response_metadata.py +9 -0
- skyflow/vault/data/_query_response_record.py +9 -0
- skyflow/vault/data/_upload_files_column_result.py +11 -0
- skyflow/vault/data/_upload_files_options.py +8 -0
- skyflow/vault/data/_upload_files_request.py +9 -0
- skyflow/vault/data/_upload_files_request_column.py +11 -0
- skyflow/vault/data/_upload_files_request_record.py +10 -0
- skyflow/vault/data/_upload_files_response.py +6 -0
- skyflow/vault/data/_upload_files_response_record.py +15 -0
- skyflow/vault/detect/__init__.py +37 -0
- skyflow/vault/detect/_redaction_level.py +14 -0
- {skyflow_flowvault_python-1.0.0.dist-info → skyflow_flowvault_python-1.1.0.dist-info}/METADATA +601 -11
- skyflow_flowvault_python-1.1.0.dist-info/RECORD +334 -0
- {skyflow_flowvault_python-1.0.0.dist-info → skyflow_flowvault_python-1.1.0.dist-info}/WHEEL +1 -1
- skyflow_flowvault_python-1.0.0.dist-info/RECORD +0 -202
- {skyflow_flowvault_python-1.0.0.dist-info → skyflow_flowvault_python-1.1.0.dist-info}/top_level.txt +0 -0
|
@@ -2,23 +2,239 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
from .
|
|
10
|
-
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .types import (
|
|
10
|
+
AudioV2,
|
|
11
|
+
AudioV2Bleep,
|
|
12
|
+
AudioV2OutputTranscription,
|
|
13
|
+
DeidentifyFileResponseV2,
|
|
14
|
+
DeidentifyStringResponseV2,
|
|
15
|
+
DeidentifyStringResponseV2DetectedEntity,
|
|
16
|
+
DeidentifyStringResponseV2EntityLocation,
|
|
17
|
+
Detect,
|
|
18
|
+
DetectConfigV2,
|
|
19
|
+
DetectConfigV2VaultType,
|
|
20
|
+
DetectCustomTypes,
|
|
21
|
+
DetectCustomTypesDeidentificationType,
|
|
22
|
+
DetectCustomTypesIncludePrefix,
|
|
23
|
+
DetectEntity,
|
|
24
|
+
DetectEntityDeidentificationType,
|
|
25
|
+
DetectEntityEntityType,
|
|
26
|
+
DetectEntityIncludePrefix,
|
|
27
|
+
DetectGuardrailsResponseV2,
|
|
28
|
+
DetectGuardrailsResponseV2Validation,
|
|
29
|
+
DetectObjectEntity,
|
|
30
|
+
DetectObjectEntityDeidentificationType,
|
|
31
|
+
DetectObjectEntityEntityType,
|
|
32
|
+
DetectReturnEntities,
|
|
33
|
+
DetectRunsResponseV2,
|
|
34
|
+
DetectRunsResponseV2OutputType,
|
|
35
|
+
DetectRunsResponseV2Status,
|
|
36
|
+
DocumentV2,
|
|
37
|
+
DocumentV2Pdf,
|
|
38
|
+
DocumentV2PdfProcessingMode,
|
|
39
|
+
EntityTransformation,
|
|
40
|
+
ErrorResponse,
|
|
41
|
+
ErrorResponseError,
|
|
42
|
+
FileMapping,
|
|
43
|
+
FileOutput,
|
|
44
|
+
FileOutputProcessedFileExtension,
|
|
45
|
+
FileOutputProcessedFileType,
|
|
46
|
+
GetAuthTokenResponse,
|
|
47
|
+
GetStsTokenResponse,
|
|
48
|
+
HttpCode,
|
|
49
|
+
ImageV2,
|
|
50
|
+
ImageV2MaskingMethod,
|
|
51
|
+
Media,
|
|
52
|
+
Metrics,
|
|
53
|
+
RedactionLevel,
|
|
54
|
+
RedactionLevelEntityName,
|
|
55
|
+
RedactionLevelRedactionType,
|
|
56
|
+
ReidentifyFileResponseV2,
|
|
57
|
+
ReidentifyFileResponseV2OutputType,
|
|
58
|
+
ReidentifyFileResponseV2Status,
|
|
59
|
+
ReidentifyStringResponseV2,
|
|
60
|
+
TransformationShiftDates,
|
|
61
|
+
)
|
|
62
|
+
from .errors import BadRequestError, InternalServerError, NotFoundError, UnauthorizedError
|
|
63
|
+
from . import authentication, files_v2, guardrails_v2, strings_v2, token_exchange
|
|
64
|
+
from ._default_clients import DefaultAioHttpClient, DefaultAsyncHttpxClient
|
|
65
|
+
from .client import AsyncSkyflowAuth, SkyflowAuth
|
|
66
|
+
from .environment import SkyflowAuthEnvironment
|
|
67
|
+
from .files_v2 import (
|
|
68
|
+
DeidentifyFileRequestV2DataFormat,
|
|
69
|
+
DeidentifyFileRequestV2DataSource,
|
|
70
|
+
ReidentifyFileRequestV2DataFormat,
|
|
71
|
+
ReidentifyFileRequestV2DataSource,
|
|
72
|
+
)
|
|
73
|
+
from .version import __version__
|
|
74
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
75
|
+
"AsyncSkyflowAuth": ".client",
|
|
76
|
+
"AudioV2": ".types",
|
|
77
|
+
"AudioV2Bleep": ".types",
|
|
78
|
+
"AudioV2OutputTranscription": ".types",
|
|
79
|
+
"BadRequestError": ".errors",
|
|
80
|
+
"DefaultAioHttpClient": "._default_clients",
|
|
81
|
+
"DefaultAsyncHttpxClient": "._default_clients",
|
|
82
|
+
"DeidentifyFileRequestV2DataFormat": ".files_v2",
|
|
83
|
+
"DeidentifyFileRequestV2DataSource": ".files_v2",
|
|
84
|
+
"DeidentifyFileResponseV2": ".types",
|
|
85
|
+
"DeidentifyStringResponseV2": ".types",
|
|
86
|
+
"DeidentifyStringResponseV2DetectedEntity": ".types",
|
|
87
|
+
"DeidentifyStringResponseV2EntityLocation": ".types",
|
|
88
|
+
"Detect": ".types",
|
|
89
|
+
"DetectConfigV2": ".types",
|
|
90
|
+
"DetectConfigV2VaultType": ".types",
|
|
91
|
+
"DetectCustomTypes": ".types",
|
|
92
|
+
"DetectCustomTypesDeidentificationType": ".types",
|
|
93
|
+
"DetectCustomTypesIncludePrefix": ".types",
|
|
94
|
+
"DetectEntity": ".types",
|
|
95
|
+
"DetectEntityDeidentificationType": ".types",
|
|
96
|
+
"DetectEntityEntityType": ".types",
|
|
97
|
+
"DetectEntityIncludePrefix": ".types",
|
|
98
|
+
"DetectGuardrailsResponseV2": ".types",
|
|
99
|
+
"DetectGuardrailsResponseV2Validation": ".types",
|
|
100
|
+
"DetectObjectEntity": ".types",
|
|
101
|
+
"DetectObjectEntityDeidentificationType": ".types",
|
|
102
|
+
"DetectObjectEntityEntityType": ".types",
|
|
103
|
+
"DetectReturnEntities": ".types",
|
|
104
|
+
"DetectRunsResponseV2": ".types",
|
|
105
|
+
"DetectRunsResponseV2OutputType": ".types",
|
|
106
|
+
"DetectRunsResponseV2Status": ".types",
|
|
107
|
+
"DocumentV2": ".types",
|
|
108
|
+
"DocumentV2Pdf": ".types",
|
|
109
|
+
"DocumentV2PdfProcessingMode": ".types",
|
|
110
|
+
"EntityTransformation": ".types",
|
|
111
|
+
"ErrorResponse": ".types",
|
|
112
|
+
"ErrorResponseError": ".types",
|
|
113
|
+
"FileMapping": ".types",
|
|
114
|
+
"FileOutput": ".types",
|
|
115
|
+
"FileOutputProcessedFileExtension": ".types",
|
|
116
|
+
"FileOutputProcessedFileType": ".types",
|
|
117
|
+
"GetAuthTokenResponse": ".types",
|
|
118
|
+
"GetStsTokenResponse": ".types",
|
|
119
|
+
"HttpCode": ".types",
|
|
120
|
+
"ImageV2": ".types",
|
|
121
|
+
"ImageV2MaskingMethod": ".types",
|
|
122
|
+
"InternalServerError": ".errors",
|
|
123
|
+
"Media": ".types",
|
|
124
|
+
"Metrics": ".types",
|
|
125
|
+
"NotFoundError": ".errors",
|
|
126
|
+
"RedactionLevel": ".types",
|
|
127
|
+
"RedactionLevelEntityName": ".types",
|
|
128
|
+
"RedactionLevelRedactionType": ".types",
|
|
129
|
+
"ReidentifyFileRequestV2DataFormat": ".files_v2",
|
|
130
|
+
"ReidentifyFileRequestV2DataSource": ".files_v2",
|
|
131
|
+
"ReidentifyFileResponseV2": ".types",
|
|
132
|
+
"ReidentifyFileResponseV2OutputType": ".types",
|
|
133
|
+
"ReidentifyFileResponseV2Status": ".types",
|
|
134
|
+
"ReidentifyStringResponseV2": ".types",
|
|
135
|
+
"SkyflowAuth": ".client",
|
|
136
|
+
"SkyflowAuthEnvironment": ".environment",
|
|
137
|
+
"TransformationShiftDates": ".types",
|
|
138
|
+
"UnauthorizedError": ".errors",
|
|
139
|
+
"__version__": ".version",
|
|
140
|
+
"authentication": ".authentication",
|
|
141
|
+
"files_v2": ".files_v2",
|
|
142
|
+
"guardrails_v2": ".guardrails_v2",
|
|
143
|
+
"strings_v2": ".strings_v2",
|
|
144
|
+
"token_exchange": ".token_exchange",
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
149
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
150
|
+
if module_name is None:
|
|
151
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
152
|
+
try:
|
|
153
|
+
module = import_module(module_name, __package__)
|
|
154
|
+
if module_name == f".{attr_name}":
|
|
155
|
+
return module
|
|
156
|
+
else:
|
|
157
|
+
return getattr(module, attr_name)
|
|
158
|
+
except ImportError as e:
|
|
159
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
160
|
+
except AttributeError as e:
|
|
161
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def __dir__():
|
|
165
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
166
|
+
return sorted(lazy_attrs)
|
|
167
|
+
|
|
11
168
|
|
|
12
169
|
__all__ = [
|
|
13
170
|
"AsyncSkyflowAuth",
|
|
171
|
+
"AudioV2",
|
|
172
|
+
"AudioV2Bleep",
|
|
173
|
+
"AudioV2OutputTranscription",
|
|
14
174
|
"BadRequestError",
|
|
15
|
-
"
|
|
175
|
+
"DefaultAioHttpClient",
|
|
176
|
+
"DefaultAsyncHttpxClient",
|
|
177
|
+
"DeidentifyFileRequestV2DataFormat",
|
|
178
|
+
"DeidentifyFileRequestV2DataSource",
|
|
179
|
+
"DeidentifyFileResponseV2",
|
|
180
|
+
"DeidentifyStringResponseV2",
|
|
181
|
+
"DeidentifyStringResponseV2DetectedEntity",
|
|
182
|
+
"DeidentifyStringResponseV2EntityLocation",
|
|
183
|
+
"Detect",
|
|
184
|
+
"DetectConfigV2",
|
|
185
|
+
"DetectConfigV2VaultType",
|
|
186
|
+
"DetectCustomTypes",
|
|
187
|
+
"DetectCustomTypesDeidentificationType",
|
|
188
|
+
"DetectCustomTypesIncludePrefix",
|
|
189
|
+
"DetectEntity",
|
|
190
|
+
"DetectEntityDeidentificationType",
|
|
191
|
+
"DetectEntityEntityType",
|
|
192
|
+
"DetectEntityIncludePrefix",
|
|
193
|
+
"DetectGuardrailsResponseV2",
|
|
194
|
+
"DetectGuardrailsResponseV2Validation",
|
|
195
|
+
"DetectObjectEntity",
|
|
196
|
+
"DetectObjectEntityDeidentificationType",
|
|
197
|
+
"DetectObjectEntityEntityType",
|
|
198
|
+
"DetectReturnEntities",
|
|
199
|
+
"DetectRunsResponseV2",
|
|
200
|
+
"DetectRunsResponseV2OutputType",
|
|
201
|
+
"DetectRunsResponseV2Status",
|
|
202
|
+
"DocumentV2",
|
|
203
|
+
"DocumentV2Pdf",
|
|
204
|
+
"DocumentV2PdfProcessingMode",
|
|
205
|
+
"EntityTransformation",
|
|
206
|
+
"ErrorResponse",
|
|
207
|
+
"ErrorResponseError",
|
|
208
|
+
"FileMapping",
|
|
209
|
+
"FileOutput",
|
|
210
|
+
"FileOutputProcessedFileExtension",
|
|
211
|
+
"FileOutputProcessedFileType",
|
|
212
|
+
"GetAuthTokenResponse",
|
|
213
|
+
"GetStsTokenResponse",
|
|
214
|
+
"HttpCode",
|
|
215
|
+
"ImageV2",
|
|
216
|
+
"ImageV2MaskingMethod",
|
|
217
|
+
"InternalServerError",
|
|
218
|
+
"Media",
|
|
219
|
+
"Metrics",
|
|
16
220
|
"NotFoundError",
|
|
17
|
-
"
|
|
221
|
+
"RedactionLevel",
|
|
222
|
+
"RedactionLevelEntityName",
|
|
223
|
+
"RedactionLevelRedactionType",
|
|
224
|
+
"ReidentifyFileRequestV2DataFormat",
|
|
225
|
+
"ReidentifyFileRequestV2DataSource",
|
|
226
|
+
"ReidentifyFileResponseV2",
|
|
227
|
+
"ReidentifyFileResponseV2OutputType",
|
|
228
|
+
"ReidentifyFileResponseV2Status",
|
|
229
|
+
"ReidentifyStringResponseV2",
|
|
18
230
|
"SkyflowAuth",
|
|
19
231
|
"SkyflowAuthEnvironment",
|
|
232
|
+
"TransformationShiftDates",
|
|
20
233
|
"UnauthorizedError",
|
|
21
|
-
"V1GetAuthTokenResponse",
|
|
22
234
|
"__version__",
|
|
23
235
|
"authentication",
|
|
236
|
+
"files_v2",
|
|
237
|
+
"guardrails_v2",
|
|
238
|
+
"strings_v2",
|
|
239
|
+
"token_exchange",
|
|
24
240
|
]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
SDK_DEFAULT_TIMEOUT = 60
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
import httpx_aiohttp # type: ignore[import-not-found]
|
|
11
|
+
except ImportError:
|
|
12
|
+
|
|
13
|
+
class DefaultAioHttpClient(httpx.AsyncClient): # type: ignore
|
|
14
|
+
def __init__(self, **kwargs: typing.Any) -> None:
|
|
15
|
+
raise RuntimeError(
|
|
16
|
+
"To use the aiohttp client, install the aiohttp extra: pip install skyflow.generated.rest[aiohttp]"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
else:
|
|
20
|
+
|
|
21
|
+
class DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore
|
|
22
|
+
def __init__(self, **kwargs: typing.Any) -> None:
|
|
23
|
+
kwargs.setdefault("timeout", SDK_DEFAULT_TIMEOUT)
|
|
24
|
+
kwargs.setdefault("follow_redirects", True)
|
|
25
|
+
super().__init__(**kwargs)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class DefaultAsyncHttpxClient(httpx.AsyncClient):
|
|
29
|
+
def __init__(self, **kwargs: typing.Any) -> None:
|
|
30
|
+
kwargs.setdefault("timeout", SDK_DEFAULT_TIMEOUT)
|
|
31
|
+
kwargs.setdefault("follow_redirects", True)
|
|
32
|
+
super().__init__(**kwargs)
|
|
@@ -4,7 +4,7 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
6
|
from ..core.request_options import RequestOptions
|
|
7
|
-
from ..types.
|
|
7
|
+
from ..types.get_auth_token_response import GetAuthTokenResponse
|
|
8
8
|
from .raw_client import AsyncRawAuthenticationClient, RawAuthenticationClient
|
|
9
9
|
|
|
10
10
|
# this is used as the default value for optional parameters
|
|
@@ -26,7 +26,7 @@ class AuthenticationClient:
|
|
|
26
26
|
"""
|
|
27
27
|
return self._raw_client
|
|
28
28
|
|
|
29
|
-
def
|
|
29
|
+
def get_bearer_token(
|
|
30
30
|
self,
|
|
31
31
|
*,
|
|
32
32
|
grant_type: str,
|
|
@@ -36,9 +36,9 @@ class AuthenticationClient:
|
|
|
36
36
|
requested_token_use: typing.Optional[str] = OMIT,
|
|
37
37
|
scope: typing.Optional[str] = OMIT,
|
|
38
38
|
request_options: typing.Optional[RequestOptions] = None,
|
|
39
|
-
) ->
|
|
39
|
+
) -> GetAuthTokenResponse:
|
|
40
40
|
"""
|
|
41
|
-
|
|
41
|
+
Generates a Bearer Token to authenticate with Skyflow.
|
|
42
42
|
|
|
43
43
|
Parameters
|
|
44
44
|
----------
|
|
@@ -46,7 +46,7 @@ class AuthenticationClient:
|
|
|
46
46
|
Grant type of the request. Set this to `urn:ietf:params:oauth:grant-type:jwt-bearer`.
|
|
47
47
|
|
|
48
48
|
assertion : str
|
|
49
|
-
User-signed JWT token that contains the following fields:
|
|
49
|
+
User-signed JWT token that contains the following fields: iss (Issuer), key (Unique identifier), aud (Recipient), exp (Expiry), sub (Subject), ctx (Optional context for context-aware authorization).
|
|
50
50
|
|
|
51
51
|
subject_token : typing.Optional[str]
|
|
52
52
|
Subject token.
|
|
@@ -58,15 +58,15 @@ class AuthenticationClient:
|
|
|
58
58
|
Token use type. Either `delegation` or `impersonation`.
|
|
59
59
|
|
|
60
60
|
scope : typing.Optional[str]
|
|
61
|
-
Subset of available
|
|
61
|
+
Subset of available roles to associate with the requested token. Uses the format "role:<roleID1> role:<roleID2>".
|
|
62
62
|
|
|
63
63
|
request_options : typing.Optional[RequestOptions]
|
|
64
64
|
Request-specific configuration.
|
|
65
65
|
|
|
66
66
|
Returns
|
|
67
67
|
-------
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
GetAuthTokenResponse
|
|
69
|
+
OK
|
|
70
70
|
|
|
71
71
|
Examples
|
|
72
72
|
--------
|
|
@@ -75,12 +75,12 @@ class AuthenticationClient:
|
|
|
75
75
|
client = SkyflowAuth(
|
|
76
76
|
token="YOUR_TOKEN",
|
|
77
77
|
)
|
|
78
|
-
client.authentication.
|
|
79
|
-
grant_type="
|
|
80
|
-
assertion="
|
|
78
|
+
client.authentication.get_bearer_token(
|
|
79
|
+
grant_type="grant_type",
|
|
80
|
+
assertion="assertion",
|
|
81
81
|
)
|
|
82
82
|
"""
|
|
83
|
-
_response = self._raw_client.
|
|
83
|
+
_response = self._raw_client.get_bearer_token(
|
|
84
84
|
grant_type=grant_type,
|
|
85
85
|
assertion=assertion,
|
|
86
86
|
subject_token=subject_token,
|
|
@@ -107,7 +107,7 @@ class AsyncAuthenticationClient:
|
|
|
107
107
|
"""
|
|
108
108
|
return self._raw_client
|
|
109
109
|
|
|
110
|
-
async def
|
|
110
|
+
async def get_bearer_token(
|
|
111
111
|
self,
|
|
112
112
|
*,
|
|
113
113
|
grant_type: str,
|
|
@@ -117,9 +117,9 @@ class AsyncAuthenticationClient:
|
|
|
117
117
|
requested_token_use: typing.Optional[str] = OMIT,
|
|
118
118
|
scope: typing.Optional[str] = OMIT,
|
|
119
119
|
request_options: typing.Optional[RequestOptions] = None,
|
|
120
|
-
) ->
|
|
120
|
+
) -> GetAuthTokenResponse:
|
|
121
121
|
"""
|
|
122
|
-
|
|
122
|
+
Generates a Bearer Token to authenticate with Skyflow.
|
|
123
123
|
|
|
124
124
|
Parameters
|
|
125
125
|
----------
|
|
@@ -127,7 +127,7 @@ class AsyncAuthenticationClient:
|
|
|
127
127
|
Grant type of the request. Set this to `urn:ietf:params:oauth:grant-type:jwt-bearer`.
|
|
128
128
|
|
|
129
129
|
assertion : str
|
|
130
|
-
User-signed JWT token that contains the following fields:
|
|
130
|
+
User-signed JWT token that contains the following fields: iss (Issuer), key (Unique identifier), aud (Recipient), exp (Expiry), sub (Subject), ctx (Optional context for context-aware authorization).
|
|
131
131
|
|
|
132
132
|
subject_token : typing.Optional[str]
|
|
133
133
|
Subject token.
|
|
@@ -139,15 +139,15 @@ class AsyncAuthenticationClient:
|
|
|
139
139
|
Token use type. Either `delegation` or `impersonation`.
|
|
140
140
|
|
|
141
141
|
scope : typing.Optional[str]
|
|
142
|
-
Subset of available
|
|
142
|
+
Subset of available roles to associate with the requested token. Uses the format "role:<roleID1> role:<roleID2>".
|
|
143
143
|
|
|
144
144
|
request_options : typing.Optional[RequestOptions]
|
|
145
145
|
Request-specific configuration.
|
|
146
146
|
|
|
147
147
|
Returns
|
|
148
148
|
-------
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
GetAuthTokenResponse
|
|
150
|
+
OK
|
|
151
151
|
|
|
152
152
|
Examples
|
|
153
153
|
--------
|
|
@@ -161,15 +161,15 @@ class AsyncAuthenticationClient:
|
|
|
161
161
|
|
|
162
162
|
|
|
163
163
|
async def main() -> None:
|
|
164
|
-
await client.authentication.
|
|
165
|
-
grant_type="
|
|
166
|
-
assertion="
|
|
164
|
+
await client.authentication.get_bearer_token(
|
|
165
|
+
grant_type="grant_type",
|
|
166
|
+
assertion="assertion",
|
|
167
167
|
)
|
|
168
168
|
|
|
169
169
|
|
|
170
170
|
asyncio.run(main())
|
|
171
171
|
"""
|
|
172
|
-
_response = await self._raw_client.
|
|
172
|
+
_response = await self._raw_client.get_bearer_token(
|
|
173
173
|
grant_type=grant_type,
|
|
174
174
|
assertion=assertion,
|
|
175
175
|
subject_token=subject_token,
|