wmill 1.481.0__py3-none-any.whl → 1.483.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.
wmill/client.py
CHANGED
@@ -586,6 +586,12 @@ class Windmill:
|
|
586
586
|
raise Exception("Could not write file to S3") from e
|
587
587
|
return S3Object(s3=response["file_key"])
|
588
588
|
|
589
|
+
def sign_s3_objects(self, s3_objects: list[S3Object]) -> list[S3Object]:
|
590
|
+
return self.post(f"/w/{self.workspace}/apps/sign_s3_objects", json={"s3_objects": s3_objects}).json()
|
591
|
+
|
592
|
+
def sign_s3_object(self, s3_object: S3Object) -> S3Object:
|
593
|
+
return self.post(f"/w/{self.workspace}/apps/sign_s3_objects", json={"s3_objects": [s3_object]}).json()[0]
|
594
|
+
|
589
595
|
def __boto3_connection_settings(self, s3_resource) -> Boto3ConnectionSettings:
|
590
596
|
endpoint_url_prefix = "https://" if s3_resource["useSSL"] else "http://"
|
591
597
|
return Boto3ConnectionSettings(
|
@@ -974,6 +980,24 @@ def write_s3_file(
|
|
974
980
|
return _client.write_s3_file(s3object, file_content, s3_resource_path if s3_resource_path != "" else None, content_type, content_disposition)
|
975
981
|
|
976
982
|
|
983
|
+
@init_global_client
|
984
|
+
def sign_s3_objects(s3_objects: list[S3Object]) -> list[S3Object]:
|
985
|
+
"""
|
986
|
+
Sign S3 objects to be used by anonymous users in public apps
|
987
|
+
Returns a list of signed s3 tokens
|
988
|
+
"""
|
989
|
+
return _client.sign_s3_objects(s3_objects)
|
990
|
+
|
991
|
+
|
992
|
+
@init_global_client
|
993
|
+
def sign_s3_object(s3_object: S3Object) -> S3Object:
|
994
|
+
"""
|
995
|
+
Sign S3 object to be used by anonymous users in public apps
|
996
|
+
Returns a signed s3 object
|
997
|
+
"""
|
998
|
+
return _client.sign_s3_object(s3_object)
|
999
|
+
|
1000
|
+
|
977
1001
|
@init_global_client
|
978
1002
|
def whoami() -> dict:
|
979
1003
|
"""
|
wmill/s3_types.py
CHANGED
@@ -0,0 +1,8 @@
|
|
1
|
+
wmill/__init__.py,sha256=nGZnQPezTdrBnBW1D0JqUtm75Gdf_xi3tAcPGwHRZ5A,46
|
2
|
+
wmill/client.py,sha256=bwWDX_TKjddIlA-guczp32kT_Z0nLUGZNyZmm4LCNvM,42371
|
3
|
+
wmill/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
|
4
|
+
wmill/s3_reader.py,sha256=izHlg2Xsg0Sr_LkDDEC35VuEijJcuPBDIm-xj21KsgU,1668
|
5
|
+
wmill/s3_types.py,sha256=S5w6fVAai5Adm1MxZoxF21R-EE5-wRfGzXBK72-FZvE,1199
|
6
|
+
wmill-1.483.0.dist-info/METADATA,sha256=VekMKwRWjBi8PwoTDWHvZB_FClqxRepWTWItZzbzz1s,2693
|
7
|
+
wmill-1.483.0.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
8
|
+
wmill-1.483.0.dist-info/RECORD,,
|
wmill-1.481.0.dist-info/RECORD
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
wmill/__init__.py,sha256=nGZnQPezTdrBnBW1D0JqUtm75Gdf_xi3tAcPGwHRZ5A,46
|
2
|
-
wmill/client.py,sha256=ghZgm9PSMgbyu7Kfmtqw4pJGnlD2U2EAY8QMkqUMQWw,41518
|
3
|
-
wmill/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
|
4
|
-
wmill/s3_reader.py,sha256=izHlg2Xsg0Sr_LkDDEC35VuEijJcuPBDIm-xj21KsgU,1668
|
5
|
-
wmill/s3_types.py,sha256=XVjPyc5sjWesTy6nnRReojhyPgPsaT0EY3X57mWUaJ4,1173
|
6
|
-
wmill-1.481.0.dist-info/METADATA,sha256=l-Vg2xAOxTU0UNS9j5CutPw_mjTUcOyEXJIzMolHLa4,2693
|
7
|
-
wmill-1.481.0.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
8
|
-
wmill-1.481.0.dist-info/RECORD,,
|
File without changes
|