wmill 1.569.0__py3-none-any.whl → 1.571.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.
Potentially problematic release.
This version of wmill might be problematic. Click here for more details.
wmill/client.py
CHANGED
|
@@ -534,6 +534,35 @@ class Windmill:
|
|
|
534
534
|
json={"value": value},
|
|
535
535
|
)
|
|
536
536
|
|
|
537
|
+
def list_resources(
|
|
538
|
+
self,
|
|
539
|
+
resource_type: str = None,
|
|
540
|
+
page: int = None,
|
|
541
|
+
per_page: int = None,
|
|
542
|
+
) -> list[dict]:
|
|
543
|
+
"""List resources from Windmill workspace.
|
|
544
|
+
|
|
545
|
+
Args:
|
|
546
|
+
resource_type: Optional resource type to filter by (e.g., "postgresql", "mysql", "s3")
|
|
547
|
+
page: Optional page number for pagination
|
|
548
|
+
per_page: Optional number of results per page
|
|
549
|
+
|
|
550
|
+
Returns:
|
|
551
|
+
List of resource dictionaries
|
|
552
|
+
"""
|
|
553
|
+
params = {}
|
|
554
|
+
if resource_type is not None:
|
|
555
|
+
params["resource_type"] = resource_type
|
|
556
|
+
if page is not None:
|
|
557
|
+
params["page"] = page
|
|
558
|
+
if per_page is not None:
|
|
559
|
+
params["per_page"] = per_page
|
|
560
|
+
|
|
561
|
+
return self.get(
|
|
562
|
+
f"/w/{self.workspace}/resources/list",
|
|
563
|
+
params=params if params else None,
|
|
564
|
+
).json()
|
|
565
|
+
|
|
537
566
|
def set_state(self, value: Any):
|
|
538
567
|
self.set_resource(value, path=self.state_path, resource_type="state")
|
|
539
568
|
|
|
@@ -1263,6 +1292,36 @@ def set_resource(path: str, value: Any, resource_type: str = "any") -> None:
|
|
|
1263
1292
|
return _client.set_resource(value=value, path=path, resource_type=resource_type)
|
|
1264
1293
|
|
|
1265
1294
|
|
|
1295
|
+
@init_global_client
|
|
1296
|
+
def list_resources(
|
|
1297
|
+
resource_type: str = None,
|
|
1298
|
+
page: int = None,
|
|
1299
|
+
per_page: int = None,
|
|
1300
|
+
) -> list[dict]:
|
|
1301
|
+
"""List resources from Windmill workspace.
|
|
1302
|
+
|
|
1303
|
+
Args:
|
|
1304
|
+
resource_type: Optional resource type to filter by (e.g., "postgresql", "mysql", "s3")
|
|
1305
|
+
page: Optional page number for pagination
|
|
1306
|
+
per_page: Optional number of results per page
|
|
1307
|
+
|
|
1308
|
+
Returns:
|
|
1309
|
+
List of resource dictionaries
|
|
1310
|
+
|
|
1311
|
+
Example:
|
|
1312
|
+
>>> # Get all resources
|
|
1313
|
+
>>> all_resources = wmill.list_resources()
|
|
1314
|
+
|
|
1315
|
+
>>> # Get only PostgreSQL resources
|
|
1316
|
+
>>> pg_resources = wmill.list_resources(resource_type="postgresql")
|
|
1317
|
+
"""
|
|
1318
|
+
return _client.list_resources(
|
|
1319
|
+
resource_type=resource_type,
|
|
1320
|
+
page=page,
|
|
1321
|
+
per_page=per_page,
|
|
1322
|
+
)
|
|
1323
|
+
|
|
1324
|
+
|
|
1266
1325
|
@init_global_client
|
|
1267
1326
|
def set_state(value: Any) -> None:
|
|
1268
1327
|
"""
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
wmill/__init__.py,sha256=nGZnQPezTdrBnBW1D0JqUtm75Gdf_xi3tAcPGwHRZ5A,46
|
|
2
|
-
wmill/client.py,sha256=
|
|
2
|
+
wmill/client.py,sha256=rDB6f0AMcBVeQa0zODwjCKBwYPi3-bISfq3FEf_trdA,53085
|
|
3
3
|
wmill/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
|
|
4
4
|
wmill/s3_reader.py,sha256=Rq6m9T_SxReIi0OJA28FXSddHQRk2wUJCfbcw_FQ8Ao,2149
|
|
5
5
|
wmill/s3_types.py,sha256=D4W1miV41Sa0YC_p7Jqr8j8Sp4Z2GgFAVsFR0ZYIrVM,1235
|
|
6
|
-
wmill-1.
|
|
7
|
-
wmill-1.
|
|
8
|
-
wmill-1.
|
|
6
|
+
wmill-1.571.0.dist-info/METADATA,sha256=Jm113xBSZm3lzWEGYd-1z7MBt_U57XsmzV3k-SR3GpM,2693
|
|
7
|
+
wmill-1.571.0.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
8
|
+
wmill-1.571.0.dist-info/RECORD,,
|
|
File without changes
|