diracx-client 0.0.1a38__tar.gz → 0.0.5__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 (48) hide show
  1. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/.gitignore +5 -0
  2. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/PKG-INFO +2 -1
  3. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/pyproject.toml +1 -1
  4. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/_client_importer.py +2 -2
  5. {diracx_client-0.0.1a38/src/diracx/client/_generated/aio → diracx_client-0.0.5/src/diracx/client/_generated}/__init__.py +1 -1
  6. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/_client.py +13 -35
  7. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/_configuration.py +7 -19
  8. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/_serialization.py +1 -1
  9. diracx_client-0.0.5/src/diracx/client/_generated/_utils/__init__.py +4 -0
  10. diracx_client-0.0.5/src/diracx/client/_generated/_utils/serialization.py +2030 -0
  11. diracx_client-0.0.5/src/diracx/client/_generated/_utils/utils.py +49 -0
  12. {diracx_client-0.0.1a38/src/diracx/client/_generated/aio → diracx_client-0.0.5/src/diracx/client/_generated}/_vendor.py +1 -1
  13. {diracx_client-0.0.1a38/src/diracx/client/_generated → diracx_client-0.0.5/src/diracx/client/_generated/aio}/__init__.py +1 -1
  14. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/aio/_client.py +11 -31
  15. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/aio/_configuration.py +8 -22
  16. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/aio/_patch.py +1 -3
  17. {diracx_client-0.0.1a38/src/diracx/client/_generated → diracx_client-0.0.5/src/diracx/client/_generated/aio}/_vendor.py +1 -1
  18. {diracx_client-0.0.1a38/src/diracx/client/_generated → diracx_client-0.0.5/src/diracx/client/_generated/aio}/operations/__init__.py +1 -1
  19. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/aio/operations/_operations.py +487 -470
  20. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/models/__init__.py +20 -11
  21. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/models/_enums.py +4 -1
  22. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/models/_models.py +492 -168
  23. {diracx_client-0.0.1a38/src/diracx/client/_generated/aio → diracx_client-0.0.5/src/diracx/client/_generated}/operations/__init__.py +1 -1
  24. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/operations/_operations.py +569 -627
  25. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/patches/auth/aio.py +27 -3
  26. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/patches/auth/common.py +37 -8
  27. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/patches/auth/sync.py +29 -4
  28. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/patches/client/common.py +1 -1
  29. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/patches/jobs/aio.py +20 -2
  30. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/patches/jobs/common.py +52 -3
  31. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/patches/jobs/sync.py +20 -2
  32. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/patches/utils.py +1 -1
  33. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/tests/test_auth.py +9 -5
  34. diracx_client-0.0.1a38/tests/test_regenerate.py +0 -37
  35. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/README.md +0 -0
  36. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/_diracx_client_importer.pth +0 -0
  37. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/__init__.py +0 -0
  38. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/_patch.py +0 -0
  39. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/aio/operations/_patch.py +0 -0
  40. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/models/_patch.py +0 -0
  41. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/operations/_patch.py +0 -0
  42. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/_generated/py.typed +0 -0
  43. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/aio.py +0 -0
  44. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/models.py +0 -0
  45. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/patches/client/aio.py +0 -0
  46. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/patches/client/sync.py +0 -0
  47. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/py.typed +0 -0
  48. {diracx_client-0.0.1a38 → diracx_client-0.0.5}/src/diracx/client/sync.py +0 -0
@@ -91,3 +91,8 @@ docs/source/_build
91
91
  # CMT junk
92
92
  /*/*/x86_64-*-*-*/
93
93
  */*/cmt/Makefile
94
+
95
+ # pixi environments
96
+ .pixi
97
+ pixi.lock
98
+ *.egg-info
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diracx-client
3
- Version: 0.0.1a38
3
+ Version: 0.0.5
4
4
  Summary: TODO
5
5
  License: GPL-3.0-only
6
6
  Classifier: Intended Audience :: Science/Research
@@ -13,6 +13,7 @@ Requires-Dist: azure-core
13
13
  Requires-Dist: diracx-core
14
14
  Requires-Dist: httpx
15
15
  Requires-Dist: isodate
16
+ Requires-Dist: pyjwt
16
17
  Provides-Extra: testing
17
18
  Requires-Dist: diracx-testing; extra == 'testing'
18
19
  Provides-Extra: types
@@ -12,7 +12,7 @@ classifiers = [
12
12
  "Topic :: Scientific/Engineering",
13
13
  "Topic :: System :: Distributed Computing",
14
14
  ]
15
- dependencies = ["azure-core", "diracx-core", "isodate", "httpx"]
15
+ dependencies = ["azure-core", "diracx-core", "isodate", "httpx", "pyjwt"]
16
16
  dynamic = ["version"]
17
17
 
18
18
  [project.optional-dependencies]
@@ -241,12 +241,12 @@ class DiracXPatchLoader(DiracXAliasLoader):
241
241
  def exec_module(self, module):
242
242
  """Import an autorest generated module with two layers of patches."""
243
243
  # Import the real module and set its __name__ to the alias. This will
244
- # then corrospond to the __init__.py file + the _patch.py file from
244
+ # then correspond to the __init__.py file + the _patch.py file from
245
245
  # plain DiracX. When calling self.original_loader.exec_module it will:
246
246
  # 1. Import the real module (e.g. aio/__init__.py)
247
247
  # 2. Import any submodules (e.g. _operations)
248
248
  # 3. Import the patch module from plain DiracX (e.g. _patch.py,
249
- # overriden by the DiracXPathFinder)
249
+ # overridden by the DiracXPathFinder)
250
250
  # 4. Replace the submodules module's objects with anything in ._patch.__all__
251
251
  super().exec_module(module)
252
252
 
@@ -1,6 +1,6 @@
1
1
  # coding=utf-8
2
2
  # --------------------------------------------------------------------------
3
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.32.2)
3
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.34.2)
4
4
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
5
5
  # --------------------------------------------------------------------------
6
6
  # pylint: disable=wrong-import-position
@@ -1,6 +1,6 @@
1
1
  # coding=utf-8
2
2
  # --------------------------------------------------------------------------
3
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.32.2)
3
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.34.2)
4
4
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
5
5
  # --------------------------------------------------------------------------
6
6
 
@@ -14,13 +14,8 @@ from azure.core.rest import HttpRequest, HttpResponse
14
14
 
15
15
  from . import models as _models
16
16
  from ._configuration import DiracConfiguration
17
- from ._serialization import Deserializer, Serializer
18
- from .operations import (
19
- AuthOperations,
20
- ConfigOperations,
21
- JobsOperations,
22
- WellKnownOperations,
23
- )
17
+ from ._utils.serialization import Deserializer, Serializer
18
+ from .operations import AuthOperations, ConfigOperations, JobsOperations, WellKnownOperations
24
19
 
25
20
 
26
21
  class Dirac: # pylint: disable=client-accepts-api-version-keyword
@@ -42,6 +37,7 @@ class Dirac: # pylint: disable=client-accepts-api-version-keyword
42
37
  self, *, endpoint: str = "", **kwargs: Any
43
38
  ) -> None:
44
39
  self._config = DiracConfiguration(**kwargs)
40
+
45
41
  _policies = kwargs.pop("policies", None)
46
42
  if _policies is None:
47
43
  _policies = [
@@ -56,39 +52,21 @@ class Dirac: # pylint: disable=client-accepts-api-version-keyword
56
52
  self._config.custom_hook_policy,
57
53
  self._config.logging_policy,
58
54
  policies.DistributedTracingPolicy(**kwargs),
59
- (
60
- policies.SensitiveHeaderCleanupPolicy(**kwargs)
61
- if self._config.redirect_policy
62
- else None
63
- ),
55
+ policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
64
56
  self._config.http_logging_policy,
65
57
  ]
66
- self._client: PipelineClient = PipelineClient(
67
- base_url=endpoint, policies=_policies, **kwargs
68
- )
58
+ self._client: PipelineClient = PipelineClient(base_url=endpoint, policies=_policies, **kwargs)
69
59
 
70
- client_models = {
71
- k: v for k, v in _models.__dict__.items() if isinstance(v, type)
72
- }
60
+ client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
73
61
  self._serialize = Serializer(client_models)
74
62
  self._deserialize = Deserializer(client_models)
75
63
  self._serialize.client_side_validation = False
76
- self.well_known = WellKnownOperations(
77
- self._client, self._config, self._serialize, self._deserialize
78
- )
79
- self.auth = AuthOperations(
80
- self._client, self._config, self._serialize, self._deserialize
81
- )
82
- self.config = ConfigOperations(
83
- self._client, self._config, self._serialize, self._deserialize
84
- )
85
- self.jobs = JobsOperations(
86
- self._client, self._config, self._serialize, self._deserialize
87
- )
88
-
89
- def send_request(
90
- self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
91
- ) -> HttpResponse:
64
+ self.well_known = WellKnownOperations(self._client, self._config, self._serialize, self._deserialize)
65
+ self.auth = AuthOperations(self._client, self._config, self._serialize, self._deserialize)
66
+ self.config = ConfigOperations(self._client, self._config, self._serialize, self._deserialize)
67
+ self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
68
+
69
+ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
92
70
  """Runs the network request through the client's chained policies.
93
71
 
94
72
  >>> from azure.core.rest import HttpRequest
@@ -1,6 +1,6 @@
1
1
  # coding=utf-8
2
2
  # --------------------------------------------------------------------------
3
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.32.2)
3
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.34.2)
4
4
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
5
5
  # --------------------------------------------------------------------------
6
6
 
@@ -25,24 +25,12 @@ class DiracConfiguration: # pylint: disable=too-many-instance-attributes
25
25
  self._configure(**kwargs)
26
26
 
27
27
  def _configure(self, **kwargs: Any) -> None:
28
- self.user_agent_policy = kwargs.get(
29
- "user_agent_policy"
30
- ) or policies.UserAgentPolicy(**kwargs)
31
- self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(
32
- **kwargs
33
- )
28
+ self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
29
+ self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
34
30
  self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
35
- self.logging_policy = kwargs.get(
36
- "logging_policy"
37
- ) or policies.NetworkTraceLoggingPolicy(**kwargs)
38
- self.http_logging_policy = kwargs.get(
39
- "http_logging_policy"
40
- ) or policies.HttpLoggingPolicy(**kwargs)
41
- self.custom_hook_policy = kwargs.get(
42
- "custom_hook_policy"
43
- ) or policies.CustomHookPolicy(**kwargs)
44
- self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(
45
- **kwargs
46
- )
31
+ self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
32
+ self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs)
33
+ self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
34
+ self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
47
35
  self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
48
36
  self.authentication_policy = kwargs.get("authentication_policy")
@@ -1,7 +1,7 @@
1
1
  # pylint: disable=line-too-long,useless-suppression,too-many-lines
2
2
  # coding=utf-8
3
3
  # --------------------------------------------------------------------------
4
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.32.2)
4
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.33.0)
5
5
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
6
6
  # --------------------------------------------------------------------------
7
7
 
@@ -0,0 +1,4 @@
1
+ # --------------------------------------------------------------------------
2
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.34.2)
3
+ # Changes may cause incorrect behavior and will be lost if the code is regenerated.
4
+ # --------------------------------------------------------------------------