wmill 1.150.0__tar.gz → 1.151.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.

Potentially problematic release.


This version of wmill might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wmill
3
- Version: 1.150.0
3
+ Version: 1.151.0
4
4
  Summary: A client library for accessing Windmill server wrapping the Windmill client API
5
5
  Home-page: https://windmill.dev
6
6
  License: Apache-2.0
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.8
14
14
  Classifier: Programming Language :: Python :: 3.9
15
15
  Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
- Requires-Dist: windmill-api (>=1.150.0,<2.0.0)
17
+ Requires-Dist: windmill-api (>=1.151.0,<2.0.0)
18
18
  Project-URL: Documentation, https://windmill.dev
19
19
  Description-Content-Type: text/markdown
20
20
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "wmill"
3
- version = "1.150.0"
3
+ version = "1.151.0"
4
4
  description = "A client library for accessing Windmill server wrapping the Windmill client API"
5
5
  license = "Apache-2.0"
6
6
  homepage = "https://windmill.dev"
@@ -16,7 +16,7 @@ include = ["wmill/py.typed"]
16
16
 
17
17
  [tool.poetry.dependencies]
18
18
  python = "^3.7"
19
- windmill-api = "^1.150.0"
19
+ windmill-api = "^1.151.0"
20
20
 
21
21
  [build-system]
22
22
  requires = ["poetry>=1.0.2", "poetry-dynamic-versioning"]
@@ -8,11 +8,11 @@ package_data = \
8
8
  {'': ['*']}
9
9
 
10
10
  install_requires = \
11
- ['windmill-api>=1.150.0,<2.0.0']
11
+ ['windmill-api>=1.151.0,<2.0.0']
12
12
 
13
13
  setup_kwargs = {
14
14
  'name': 'wmill',
15
- 'version': '1.150.0',
15
+ 'version': '1.151.0',
16
16
  'description': 'A client library for accessing Windmill server wrapping the Windmill client API',
17
17
  'long_description': '# wmill\n\nThe core client for the [Windmill](https://windmill.dev) platform.\n\nIt is a convenient wrapper around the exhaustive, automatically generated from\nOpenApi but less user-friendly\n[windmill-api](https://pypi.org/project/windmill-api/).\n\n## Quickstart\n\n```python\nimport wmill\n\n\ndef main():\n #os.environ.set("WM_TOKEN", "<mytoken>") OPTIONAL to set token used by the wmill client\n version = wmill.get_version()\n resource = wmill.get_resource("u/user/resource_path")\n\n # run synchronously, will return the result\n res = wmill.run_script_sync(hash="000000000000002a", args={})\n print(res)\n\n for _ in range(3):\n # run asynchrnously, will return immediately. Can be scheduled\n wmill.run_script_async(hash="000000000000002a", args={}, scheduled_in_secs=10)\n```\n',
18
18
  'author': 'Ruben Fiszel',
@@ -2,6 +2,7 @@ from typing import Any, Union, Dict
2
2
  from typing import Generic, TypeVar, TypeAlias
3
3
 
4
4
  import os
5
+ import json
5
6
 
6
7
  from time import sleep
7
8
  from windmill_api.models.whoami_response_200 import WhoamiResponse200
@@ -163,7 +164,12 @@ def get_resource(path: str | None = None, none_if_undefined: bool = False) -> An
163
164
  path = path or get_state_path()
164
165
  parsed = get_resource_api.sync_detailed(
165
166
  workspace=get_workspace(), path=path, client=create_client()
166
- ).parsed
167
+ )
168
+ try:
169
+ parsed = json.loads(parsed.content.decode("utf-8"))
170
+ except:
171
+ parsed = None
172
+
167
173
  if parsed is None:
168
174
  if none_if_undefined:
169
175
  return None
File without changes
File without changes
File without changes