UncountablePythonSDK 0.0.43__py3-none-any.whl → 0.0.44__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 UncountablePythonSDK might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: UncountablePythonSDK
3
- Version: 0.0.43
3
+ Version: 0.0.44
4
4
  Summary: Uncountable SDK
5
5
  Project-URL: Homepage, https://github.com/uncountableinc/uncountable-python-sdk
6
6
  Project-URL: Repository, https://github.com/uncountableinc/uncountable-python-sdk.git
@@ -28,8 +28,8 @@ pkgs/argument_parser/case_convert.py,sha256=NuJLJUJRbyVb6_Slen4uqaStEHbcOS1d-hBB
28
28
  pkgs/filesystem_utils/__init__.py,sha256=yxfwtYFvqq_fjMl-tg2jwa6eNPNZUF4ykqsSzALyNdw,1143
29
29
  pkgs/filesystem_utils/_gdrive_session.py,sha256=OZudNoP2HikolnpurVJhJdh5fgzqbaZQvn53ReGGXx4,11015
30
30
  pkgs/filesystem_utils/_local_session.py,sha256=xFEYhAvNqrOYqwt4jrEYOuYkjJn0zclZhTelW_Q1-rw,2325
31
- pkgs/filesystem_utils/_sftp_session.py,sha256=jtvxmMs3H1RneuJhztx1pCSbX9hBq3srFV1IVNqUlBA,4729
32
- pkgs/filesystem_utils/file_type_utils.py,sha256=F6P2chbXIDwAUAiMc_ja1_rxrhGy3fA1-ymAnIK3gVU,1259
31
+ pkgs/filesystem_utils/_sftp_session.py,sha256=gNoUD_b4MuVqWj31nU-FpfpXZlyWkwdEHtX1S8W6gpQ,4727
32
+ pkgs/filesystem_utils/file_type_utils.py,sha256=CC2c7127TE84vlRTy7bpE4Qvy7ytxuRNA3dwP91PXA8,1257
33
33
  pkgs/filesystem_utils/filesystem_session.py,sha256=BQ2Go8Mu9-GcnaWh2Pm4x7ugLVsres6XrOQ8RoiEpcE,1045
34
34
  pkgs/serialization/__init__.py,sha256=LifasRW0a50A3qRFmo2bf3FQ6TXhZWOTz2-CVTgPjcQ,753
35
35
  pkgs/serialization/missing_sentry.py,sha256=aM_9KxbCk9dVvXvcOKgkIQBqFWvLhv8QlIUCiuFEXMo,806
@@ -86,7 +86,7 @@ uncountable/integration/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
86
86
  uncountable/integration/db/connect.py,sha256=YtQHJ1DBGPhxKFRCfiXqohOYUceKSxMVOJ88aPI48Ug,181
87
87
  uncountable/integration/executors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
88
88
  uncountable/integration/executors/executors.py,sha256=v5ClGVUlvrZcMdmGQa8Ll668G_HGTnKpGOnTM7UMZCQ,956
89
- uncountable/integration/executors/generic_upload_executor.py,sha256=lCHGIMCe3t_UvEgHMBoOneWR2zbYaGXztt5F2zDRBLw,8796
89
+ uncountable/integration/executors/generic_upload_executor.py,sha256=H_pfseSATBvY44xVNFC8VP6wL9pqoXG2qcReA76hl0E,8790
90
90
  uncountable/integration/executors/script_executor.py,sha256=OmSBOtU48G3mqza9c2lCm84pGGyaDk-ZBJCx3RsdJXc,846
91
91
  uncountable/integration/secret_retrieval/__init__.py,sha256=3QXVj35w8rRMxVvmmsViFYDi3lcb3g70incfalOEm6o,87
92
92
  uncountable/integration/secret_retrieval/retrieve_secret.py,sha256=M0qXVJpD8hMYIFypHFeyh598sqmIDX8ZOyXK23CluF0,1323
@@ -235,7 +235,7 @@ uncountable/types/api/triggers/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr
235
235
  uncountable/types/api/triggers/run_trigger.py,sha256=_Rpha9nxXI3Xr17CrGDtofg4HZ81x2lt0rMZ6As0qfE,893
236
236
  uncountable/types/api/uploader/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
237
237
  uncountable/types/api/uploader/invoke_uploader.py,sha256=2RCvnccwEm6J5dt7UJVLUKxfk49vfpGXjBLCWIBD3Ck,1006
238
- UncountablePythonSDK-0.0.43.dist-info/METADATA,sha256=vhbJVX4f-c2phTYrI3H2MJ4NCXfkOHVeHa3NHq-SEGk,1707
239
- UncountablePythonSDK-0.0.43.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
240
- UncountablePythonSDK-0.0.43.dist-info/top_level.txt,sha256=1UVGjAU-6hJY9qw2iJ7nCBeEwZ793AEN5ZfKX9A1uj4,31
241
- UncountablePythonSDK-0.0.43.dist-info/RECORD,,
238
+ UncountablePythonSDK-0.0.44.dist-info/METADATA,sha256=pq3HyRKI8gVZ_HmK6Z7WQekcPSlTMWShM9CTwNpotGE,1707
239
+ UncountablePythonSDK-0.0.44.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
240
+ UncountablePythonSDK-0.0.44.dist-info/top_level.txt,sha256=1UVGjAU-6hJY9qw2iJ7nCBeEwZ793AEN5ZfKX9A1uj4,31
241
+ UncountablePythonSDK-0.0.44.dist-info/RECORD,,
@@ -63,7 +63,7 @@ class SFTPSession(FileSystemSession):
63
63
  super().__init__()
64
64
  self.host: str = sftp_config.ip
65
65
  self.username: str = sftp_config.username
66
- self.key_file: str | paramiko.AgentKey | None = (
66
+ self.key_file: str | paramiko.RSAKey | None = (
67
67
  sftp_config.pem_path
68
68
  if sftp_config.pem_path is not None
69
69
  else sftp_config.pem_key
@@ -55,7 +55,7 @@ class FileSystemSFTPConfig:
55
55
  ip: str
56
56
  username: str
57
57
  pem_path: str | None
58
- pem_key: paramiko.AgentKey | None = None
58
+ pem_key: paramiko.RSAKey | None = None
59
59
  password: str | None = None
60
60
  valid_extensions: Optional[tuple[str]] = None
61
61
  recursive: bool = True
@@ -4,6 +4,8 @@ import re
4
4
  from datetime import datetime, timezone
5
5
  from tempfile import NamedTemporaryFile
6
6
 
7
+ import paramiko
8
+
7
9
  from pkgs.filesystem_utils import (
8
10
  FileObjectData,
9
11
  FileSystemFileReference,
@@ -176,14 +178,14 @@ class GenericUploadJob(Job):
176
178
  pem_secret = retrieve_secret(
177
179
  self.data_source.pem_secret, profile_metadata=args.profile_metadata
178
180
  )
179
- with NamedTemporaryFile() as pem_file:
180
- pem_file.write(pem_secret.encode())
181
- sftp_config = FileSystemSFTPConfig(
182
- ip=self.data_source.host,
183
- username=self.data_source.username,
184
- pem_path=pem_file.name,
185
- )
186
- return SFTPSession(sftp_config=sftp_config)
181
+ pem_key = paramiko.RSAKey.from_private_key(io.StringIO(pem_secret))
182
+ sftp_config = FileSystemSFTPConfig(
183
+ ip=self.data_source.host,
184
+ username=self.data_source.username,
185
+ pem_path=None,
186
+ pem_key=pem_key,
187
+ )
188
+ return SFTPSession(sftp_config=sftp_config)
187
189
 
188
190
  def run(self, args: JobArguments) -> JobResult:
189
191
  client = args.client