pangea-sdk 6.7.0__tar.gz → 6.9.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.
Files changed (62) hide show
  1. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/PKG-INFO +5 -5
  2. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/__init__.py +1 -1
  3. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/redact.py +6 -4
  4. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/ai_guard.py +8 -0
  5. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/redact.py +11 -26
  6. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pyproject.toml +7 -7
  7. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/README.md +0 -0
  8. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/_constants.py +0 -0
  9. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/_typing.py +0 -0
  10. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/__init__.py +0 -0
  11. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/file_uploader.py +0 -0
  12. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/request.py +0 -0
  13. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/__init__.py +0 -0
  14. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/ai_guard.py +0 -0
  15. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/audit.py +0 -0
  16. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/authn.py +0 -0
  17. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/authz.py +0 -0
  18. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/base.py +0 -0
  19. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/embargo.py +0 -0
  20. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/file_scan.py +0 -0
  21. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/intel.py +0 -0
  22. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/prompt_guard.py +0 -0
  23. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/sanitize.py +0 -0
  24. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/share.py +0 -0
  25. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/asyncio/services/vault.py +0 -0
  26. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/audit_logger.py +0 -0
  27. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/config.py +0 -0
  28. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/crypto/rsa.py +0 -0
  29. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/deep_verify.py +0 -0
  30. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/deprecated.py +0 -0
  31. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/dump_audit.py +0 -0
  32. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/exceptions.py +0 -0
  33. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/file_uploader.py +0 -0
  34. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/py.typed +0 -0
  35. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/request.py +0 -0
  36. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/response.py +0 -0
  37. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/__init__.py +0 -0
  38. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/audit/audit.py +0 -0
  39. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/audit/exceptions.py +0 -0
  40. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/audit/models.py +0 -0
  41. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/audit/signing.py +0 -0
  42. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/audit/util.py +0 -0
  43. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/authn/authn.py +0 -0
  44. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/authn/models.py +0 -0
  45. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/authz.py +0 -0
  46. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/base.py +0 -0
  47. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/embargo.py +0 -0
  48. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/file_scan.py +0 -0
  49. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/intel.py +0 -0
  50. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/prompt_guard.py +0 -0
  51. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/sanitize.py +0 -0
  52. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/share/file_format.py +0 -0
  53. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/share/share.py +0 -0
  54. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/vault/models/asymmetric.py +0 -0
  55. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/vault/models/common.py +0 -0
  56. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/vault/models/keys.py +0 -0
  57. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/vault/models/secret.py +0 -0
  58. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/vault/models/symmetric.py +0 -0
  59. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/services/vault/vault.py +0 -0
  60. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/tools.py +0 -0
  61. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/utils.py +0 -0
  62. {pangea_sdk-6.7.0 → pangea_sdk-6.9.0}/pangea/verify_audit.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pangea-sdk
3
- Version: 6.7.0
3
+ Version: 6.9.0
4
4
  Summary: Pangea API SDK
5
5
  Keywords: Pangea,SDK,Audit
6
6
  Author: Glenn Gallien
@@ -8,16 +8,16 @@ Author-email: Glenn Gallien <glenn.gallien@pangea.cloud>
8
8
  License-Expression: MIT
9
9
  Classifier: Topic :: Software Development
10
10
  Classifier: Topic :: Software Development :: Libraries
11
- Requires-Dist: aiohttp>=3.12.15,<4.0.0
12
- Requires-Dist: cryptography>=45.0.7,<46.0.0
11
+ Requires-Dist: aiohttp>=3.13.1,<4.0.0
12
+ Requires-Dist: cryptography>=46.0.3,<47.0.0
13
13
  Requires-Dist: deprecated>=1.2.18,<2.0.0
14
14
  Requires-Dist: google-crc32c>=1.7.1,<2.0.0
15
- Requires-Dist: pydantic>=2.11.9,<3.0.0
15
+ Requires-Dist: pydantic>=2.12.3,<3.0.0
16
16
  Requires-Dist: python-dateutil>=2.9.0.post0,<3.0.0
17
17
  Requires-Dist: requests>=2.32.5,<3.0.0
18
18
  Requires-Dist: requests-toolbelt>=1.0.0,<2.0.0
19
19
  Requires-Dist: typing-extensions>=4.15.0,<5.0.0
20
- Requires-Dist: yarl>=1.20.1,<2.0.0
20
+ Requires-Dist: yarl>=1.22.0,<2.0.0
21
21
  Requires-Python: >=3.9.2, <4.0.0
22
22
  Project-URL: repository, https://github.com/pangeacyber/pangea-python
23
23
  Description-Content-Type: text/markdown
@@ -1,4 +1,4 @@
1
- __version__ = "6.7.0"
1
+ __version__ = "6.9.0"
2
2
 
3
3
  from pangea.config import PangeaConfig
4
4
  from pangea.file_uploader import FileUploader
@@ -9,6 +9,7 @@ from __future__ import annotations
9
9
  from typing import Dict, List, Optional, Union
10
10
 
11
11
  import pangea.services.redact as m
12
+ from pangea._typing import T
12
13
  from pangea.asyncio.services.base import ServiceBaseAsync
13
14
  from pangea.config import PangeaConfig
14
15
  from pangea.response import PangeaResponse
@@ -182,11 +183,11 @@ class RedactAsync(ServiceBaseAsync):
182
183
  "v1/redact_structured", m.StructuredResult, data=input.model_dump(exclude_none=True)
183
184
  )
184
185
 
185
- async def unredact(self, redacted_data: m.RedactedData, fpe_context: str) -> PangeaResponse[m.UnredactResult]:
186
+ async def unredact(self, redacted_data: T, fpe_context: str) -> PangeaResponse[m.UnredactResult[T]]:
186
187
  """
187
188
  Unredact
188
189
 
189
- Decrypt or unredact fpe redactions
190
+ Decrypt or unredact FPE redactions
190
191
 
191
192
  OperationId: redact_post_v1_unredact
192
193
 
@@ -202,5 +203,6 @@ class RedactAsync(ServiceBaseAsync):
202
203
  available response fields can be found in our
203
204
  [API Documentation](https://pangea.cloud/docs/api/redact#unredact-post)
204
205
  """
205
- input = m.UnredactRequest(redacted_data=redacted_data, fpe_context=fpe_context)
206
- return await self.request.post("v1/unredact", m.UnredactResult, data=input.model_dump(exclude_none=True))
206
+ return await self.request.post(
207
+ "v1/unredact", m.UnredactResult, data={"redacted_data": redacted_data, "fpe_context": fpe_context}
208
+ )
@@ -150,6 +150,13 @@ class SecretsDetectionOverride(APIRequestModel):
150
150
  pangea_token: Optional[PiiEntityAction] = None
151
151
 
152
152
 
153
+ class ImageDetectionItems(APIRequestModel):
154
+ disabled: Optional[bool] = None
155
+ action: Optional[Literal["", "report", "block"]] = ""
156
+ topics: Optional[list[str]] = None
157
+ threshold: Annotated[Optional[float], Field(ge=0.0, le=1.0, multiple_of=0.01)] = None
158
+
159
+
153
160
  class Overrides(APIRequestModel):
154
161
  """Overrides flags."""
155
162
 
@@ -159,6 +166,7 @@ class Overrides(APIRequestModel):
159
166
  code_detection: Optional[CodeDetectionOverride] = None
160
167
  competitors: Optional[CompetitorsOverride] = None
161
168
  gibberish: Optional[GibberishOverride] = None
169
+ image: Optional[ImageDetectionItems] = None
162
170
  language_detection: Optional[LanguageDetectionOverride] = None
163
171
  malicious_entity: Optional[MaliciousEntityOverride] = None
164
172
  pii_entity: Optional[PiiEntityOverride] = None
@@ -9,6 +9,9 @@ from __future__ import annotations
9
9
  import enum
10
10
  from typing import Dict, List, Optional, Union
11
11
 
12
+ from typing_extensions import Generic
13
+
14
+ from pangea._typing import T
12
15
  from pangea.config import PangeaConfig
13
16
  from pangea.response import APIRequestModel, APIResponseModel, PangeaResponse, PangeaResponseResult
14
17
  from pangea.services.base import ServiceBase
@@ -174,28 +177,9 @@ class StructuredResult(PangeaResponseResult):
174
177
  """FPE context used to encrypt and redact data"""
175
178
 
176
179
 
177
- class UnredactRequest(APIRequestModel):
178
- """
179
- Class input to unredact data request
180
-
181
- Arguments:
182
- redacted_data: Data to unredact
183
- fpe_context (base64): FPE context used to decrypt and unredact data
184
- """
185
-
186
- redacted_data: RedactedData
187
- fpe_context: str
188
-
189
-
190
- RedactedData = Union[str, Dict]
191
-
192
-
193
- class UnredactResult(PangeaResponseResult):
194
- """
195
- Result class after an unredact request
196
- """
197
-
198
- data: RedactedData
180
+ class UnredactResult(PangeaResponseResult, Generic[T]):
181
+ data: T
182
+ """The unredacted data"""
199
183
 
200
184
 
201
185
  class Redact(ServiceBase):
@@ -364,11 +348,11 @@ class Redact(ServiceBase):
364
348
  )
365
349
  return self.request.post("v1/redact_structured", StructuredResult, data=input.model_dump(exclude_none=True))
366
350
 
367
- def unredact(self, redacted_data: RedactedData, fpe_context: str) -> PangeaResponse[UnredactResult]:
351
+ def unredact(self, redacted_data: T, fpe_context: str) -> PangeaResponse[UnredactResult[T]]:
368
352
  """
369
353
  Unredact
370
354
 
371
- Decrypt or unredact fpe redactions
355
+ Decrypt or unredact FPE redactions
372
356
 
373
357
  OperationId: redact_post_v1_unredact
374
358
 
@@ -384,5 +368,6 @@ class Redact(ServiceBase):
384
368
  available response fields can be found in our
385
369
  [API Documentation](https://pangea.cloud/docs/api/redact#unredact-post)
386
370
  """
387
- input = UnredactRequest(redacted_data=redacted_data, fpe_context=fpe_context)
388
- return self.request.post("v1/unredact", UnredactResult, data=input.model_dump(exclude_none=True))
371
+ return self.request.post(
372
+ "v1/unredact", UnredactResult, data={"redacted_data": redacted_data, "fpe_context": fpe_context}
373
+ )
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pangea-sdk"
3
- version = "6.7.0"
3
+ version = "6.9.0"
4
4
  description = "Pangea API SDK"
5
5
  authors = [
6
6
  {name = "Glenn Gallien", email = "glenn.gallien@pangea.cloud"}
@@ -14,16 +14,16 @@ classifiers = [
14
14
  ]
15
15
  requires-python = ">=3.9.2,<4.0.0"
16
16
  dependencies = [
17
- "aiohttp (>=3.12.15,<4.0.0)",
18
- "cryptography (>=45.0.7,<46.0.0)",
17
+ "aiohttp (>=3.13.1,<4.0.0)",
18
+ "cryptography (>=46.0.3,<47.0.0)",
19
19
  "deprecated (>=1.2.18,<2.0.0)",
20
20
  "google-crc32c (>=1.7.1,<2.0.0)",
21
- "pydantic (>=2.11.9,<3.0.0)",
21
+ "pydantic (>=2.12.3,<3.0.0)",
22
22
  "python-dateutil (>=2.9.0.post0,<3.0.0)",
23
23
  "requests (>=2.32.5,<3.0.0)",
24
24
  "requests-toolbelt (>=1.0.0,<2.0.0)",
25
25
  "typing-extensions (>=4.15.0,<5.0.0)",
26
- "yarl (>=1.20.1,<2.0.0)"
26
+ "yarl (>=1.22.0,<2.0.0)"
27
27
  ]
28
28
 
29
29
  [project.urls]
@@ -35,12 +35,12 @@ dev = [
35
35
  "pytest-asyncio ==1.2.0",
36
36
  "pytest_httpserver ==1.1.3",
37
37
  "types-Deprecated ==1.2.15.20250304",
38
- "types-python-dateutil ==2.9.0.20250822",
38
+ "types-python-dateutil ==2.9.0.20251008",
39
39
  "types-requests ==2.32.4.20250913",
40
40
  ]
41
41
 
42
42
  [build-system]
43
- requires = ["uv_build==0.8.17"]
43
+ requires = ["uv_build==0.9.5"]
44
44
  build-backend = "uv_build"
45
45
 
46
46
  [tool.mypy]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes