pangea-sdk 4.4.0__tar.gz → 5.0.0__tar.gz
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.
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/PKG-INFO +3 -4
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/README.md +1 -1
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/__init__.py +1 -1
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/asyncio/request.py +12 -6
- pangea_sdk-5.0.0/pangea/asyncio/services/vault.py +2240 -0
- pangea_sdk-5.0.0/pangea/crypto/rsa.py +135 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/request.py +41 -37
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/audit/signing.py +5 -4
- pangea_sdk-5.0.0/pangea/services/vault/models/asymmetric.py +169 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/vault/models/common.py +293 -171
- pangea_sdk-5.0.0/pangea/services/vault/models/keys.py +94 -0
- pangea_sdk-5.0.0/pangea/services/vault/models/secret.py +48 -0
- pangea_sdk-5.0.0/pangea/services/vault/models/symmetric.py +109 -0
- pangea_sdk-5.0.0/pangea/services/vault/vault.py +2237 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/tools.py +6 -7
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/utils.py +3 -1
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/verify_audit.py +4 -4
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pyproject.toml +3 -3
- pangea_sdk-4.4.0/pangea/asyncio/services/vault.py +0 -1456
- pangea_sdk-4.4.0/pangea/crypto/rsa.py +0 -47
- pangea_sdk-4.4.0/pangea/services/vault/models/asymmetric.py +0 -69
- pangea_sdk-4.4.0/pangea/services/vault/models/secret.py +0 -24
- pangea_sdk-4.4.0/pangea/services/vault/models/symmetric.py +0 -67
- pangea_sdk-4.4.0/pangea/services/vault/vault.py +0 -1468
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/asyncio/__init__.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/asyncio/file_uploader.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/asyncio/services/__init__.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/asyncio/services/audit.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/asyncio/services/authn.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/asyncio/services/authz.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/asyncio/services/base.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/asyncio/services/embargo.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/asyncio/services/file_scan.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/asyncio/services/intel.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/asyncio/services/redact.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/asyncio/services/sanitize.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/audit_logger.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/config.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/deep_verify.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/deprecated.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/dump_audit.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/exceptions.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/file_uploader.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/py.typed +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/response.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/__init__.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/audit/audit.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/audit/exceptions.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/audit/models.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/audit/util.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/authn/authn.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/authn/models.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/authz.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/base.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/embargo.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/file_scan.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/intel.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/redact.py +0 -0
- {pangea_sdk-4.4.0 → pangea_sdk-5.0.0}/pangea/services/sanitize.py +0 -0
@@ -1,16 +1,15 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pangea-sdk
|
3
|
-
Version:
|
3
|
+
Version: 5.0.0
|
4
4
|
Summary: Pangea API SDK
|
5
5
|
Home-page: https://pangea.cloud/docs/sdk/python/
|
6
6
|
License: MIT
|
7
7
|
Keywords: Pangea,SDK,Audit
|
8
8
|
Author: Glenn Gallien
|
9
9
|
Author-email: glenn.gallien@pangea.cloud
|
10
|
-
Requires-Python: >=3.
|
10
|
+
Requires-Python: >=3.9.0,<4.0.0
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
14
13
|
Classifier: Programming Language :: Python :: 3.9
|
15
14
|
Classifier: Programming Language :: Python :: 3.10
|
16
15
|
Classifier: Programming Language :: Python :: 3.11
|
@@ -41,7 +40,7 @@ Description-Content-Type: text/markdown
|
|
41
40
|
|
42
41
|
# Pangea Python SDK
|
43
42
|
|
44
|
-
A Python SDK for integrating with Pangea services. Supports Python v3.
|
43
|
+
A Python SDK for integrating with Pangea services. Supports Python v3.9 and
|
45
44
|
above.
|
46
45
|
|
47
46
|
## Installation
|
@@ -9,7 +9,8 @@ from typing import Any, Dict, List, Optional, Sequence, Tuple, Type, Union
|
|
9
9
|
|
10
10
|
import aiohttp
|
11
11
|
from aiohttp import FormData
|
12
|
-
from
|
12
|
+
from pydantic import BaseModel
|
13
|
+
from typing_extensions import Any, TypeVar
|
13
14
|
|
14
15
|
import pangea.exceptions as pe
|
15
16
|
from pangea.request import MultipartResponse, PangeaRequestBase
|
@@ -32,7 +33,7 @@ class PangeaRequestAsync(PangeaRequestBase):
|
|
32
33
|
self,
|
33
34
|
endpoint: str,
|
34
35
|
result_class: Type[TResult],
|
35
|
-
data:
|
36
|
+
data: str | BaseModel | dict[str, Any] | None = None,
|
36
37
|
files: Optional[List[Tuple]] = None,
|
37
38
|
poll_result: bool = True,
|
38
39
|
url: Optional[str] = None,
|
@@ -47,6 +48,13 @@ class PangeaRequestAsync(PangeaRequestBase):
|
|
47
48
|
PangeaResponse which contains the response in its entirety and
|
48
49
|
various properties to retrieve individual fields
|
49
50
|
"""
|
51
|
+
|
52
|
+
if isinstance(data, BaseModel):
|
53
|
+
data = data.model_dump(exclude_none=True)
|
54
|
+
|
55
|
+
if data is None:
|
56
|
+
data = {}
|
57
|
+
|
50
58
|
if url is None:
|
51
59
|
url = self._url(endpoint)
|
52
60
|
|
@@ -209,8 +217,7 @@ class PangeaRequestAsync(PangeaRequestBase):
|
|
209
217
|
)
|
210
218
|
|
211
219
|
return AttachedFile(filename=filename, file=await response.read(), content_type=content_type)
|
212
|
-
|
213
|
-
raise pe.DownloadFileError(f"Failed to download file. Status: {response.status}", await response.text())
|
220
|
+
raise pe.DownloadFileError(f"Failed to download file. Status: {response.status}", await response.text())
|
214
221
|
|
215
222
|
async def _get_pangea_json(self, reader: aiohttp.multipart.MultipartResponseWrapper) -> Optional[Dict[str, Any]]:
|
216
223
|
# Iterate through parts
|
@@ -369,8 +376,7 @@ class PangeaRequestAsync(PangeaRequestBase):
|
|
369
376
|
|
370
377
|
if loop_resp.accepted_result is not None and not loop_resp.accepted_result.has_upload_url:
|
371
378
|
return loop_resp
|
372
|
-
|
373
|
-
raise loop_exc
|
379
|
+
raise loop_exc
|
374
380
|
|
375
381
|
async def _handle_queued_result(self, response: PangeaResponse) -> PangeaResponse:
|
376
382
|
if self._queued_retry_enabled and response.http_status == 202:
|