diracx-client 0.0.1a25__py3-none-any.whl → 0.0.1a27__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.
@@ -1,6 +1,6 @@
1
1
  # coding=utf-8
2
2
  # --------------------------------------------------------------------------
3
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.28.0)
3
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
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.3, generator: @autorest/python@6.28.0)
3
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
4
4
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
5
5
  # --------------------------------------------------------------------------
6
6
 
@@ -1,6 +1,6 @@
1
1
  # coding=utf-8
2
2
  # --------------------------------------------------------------------------
3
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.28.0)
3
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
4
4
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
5
5
  # --------------------------------------------------------------------------
6
6
 
@@ -13,7 +13,7 @@ from datetime import datetime, timezone
13
13
  import importlib.util
14
14
  import json
15
15
  import jwt
16
- import requests
16
+ import httpx
17
17
 
18
18
  from pathlib import Path
19
19
  from typing import Any, Dict, List, Optional, cast
@@ -48,9 +48,7 @@ from typing import (
48
48
  IO,
49
49
  Mapping,
50
50
  Callable,
51
- TypeVar,
52
51
  MutableMapping,
53
- Type,
54
52
  List,
55
53
  )
56
54
 
@@ -61,13 +59,13 @@ except ImportError:
61
59
  import xml.etree.ElementTree as ET
62
60
 
63
61
  import isodate # type: ignore
62
+ from typing_extensions import Self
64
63
 
65
64
  from azure.core.exceptions import DeserializationError, SerializationError
66
65
  from azure.core.serialization import NULL as CoreNull
67
66
 
68
67
  _BOM = codecs.BOM_UTF8.decode(encoding="utf-8")
69
68
 
70
- ModelType = TypeVar("ModelType", bound="Model")
71
69
  JSON = MutableMapping[str, Any]
72
70
 
73
71
 
@@ -193,73 +191,7 @@ try:
193
191
  except NameError:
194
192
  _long_type = int
195
193
 
196
-
197
- class UTC(datetime.tzinfo):
198
- """Time Zone info for handling UTC"""
199
-
200
- def utcoffset(self, dt):
201
- """UTF offset for UTC is 0.
202
-
203
- :param datetime.datetime dt: The datetime
204
- :returns: The offset
205
- :rtype: datetime.timedelta
206
- """
207
- return datetime.timedelta(0)
208
-
209
- def tzname(self, dt):
210
- """Timestamp representation.
211
-
212
- :param datetime.datetime dt: The datetime
213
- :returns: The timestamp representation
214
- :rtype: str
215
- """
216
- return "Z"
217
-
218
- def dst(self, dt):
219
- """No daylight saving for UTC.
220
-
221
- :param datetime.datetime dt: The datetime
222
- :returns: The daylight saving time
223
- :rtype: datetime.timedelta
224
- """
225
- return datetime.timedelta(hours=1)
226
-
227
-
228
- try:
229
- from datetime import timezone as _FixedOffset # type: ignore
230
- except ImportError: # Python 2.7
231
-
232
- class _FixedOffset(datetime.tzinfo): # type: ignore
233
- """Fixed offset in minutes east from UTC.
234
- Copy/pasted from Python doc
235
- :param datetime.timedelta offset: offset in timedelta format
236
- """
237
-
238
- def __init__(self, offset) -> None:
239
- self.__offset = offset
240
-
241
- def utcoffset(self, dt):
242
- return self.__offset
243
-
244
- def tzname(self, dt):
245
- return str(self.__offset.total_seconds() / 3600)
246
-
247
- def __repr__(self):
248
- return "<FixedOffset {}>".format(self.tzname(None))
249
-
250
- def dst(self, dt):
251
- return datetime.timedelta(0)
252
-
253
- def __getinitargs__(self):
254
- return (self.__offset,)
255
-
256
-
257
- try:
258
- from datetime import timezone
259
-
260
- TZ_UTC = timezone.utc
261
- except ImportError:
262
- TZ_UTC = UTC() # type: ignore
194
+ TZ_UTC = datetime.timezone.utc
263
195
 
264
196
  _FLATTEN = re.compile(r"(?<!\\)\.")
265
197
 
@@ -476,27 +408,25 @@ class Model:
476
408
  return client_models
477
409
 
478
410
  @classmethod
479
- def deserialize(
480
- cls: Type[ModelType], data: Any, content_type: Optional[str] = None
481
- ) -> ModelType:
411
+ def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self:
482
412
  """Parse a str using the RestAPI syntax and return a model.
483
413
 
484
414
  :param str data: A str using RestAPI structure. JSON by default.
485
415
  :param str content_type: JSON by default, set application/xml if XML.
486
416
  :returns: An instance of this model
487
- :raises: DeserializationError if something went wrong
488
- :rtype: ModelType
417
+ :raises DeserializationError: if something went wrong
418
+ :rtype: Self
489
419
  """
490
420
  deserializer = Deserializer(cls._infer_class_models())
491
421
  return deserializer(cls.__name__, data, content_type=content_type) # type: ignore
492
422
 
493
423
  @classmethod
494
424
  def from_dict(
495
- cls: Type[ModelType],
425
+ cls,
496
426
  data: Any,
497
427
  key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None,
498
428
  content_type: Optional[str] = None,
499
- ) -> ModelType:
429
+ ) -> Self:
500
430
  """Parse a dict using given key extractor return a model.
501
431
 
502
432
  By default consider key
@@ -508,7 +438,7 @@ class Model:
508
438
  :param str content_type: JSON by default, set application/xml if XML.
509
439
  :returns: An instance of this model
510
440
  :raises: DeserializationError if something went wrong
511
- :rtype: ModelType
441
+ :rtype: Self
512
442
  """
513
443
  deserializer = Deserializer(cls._infer_class_models())
514
444
  deserializer.key_extractors = ( # type: ignore
@@ -664,7 +594,7 @@ class Serializer: # pylint: disable=too-many-public-methods
664
594
  :param object target_obj: The data to be serialized.
665
595
  :param str data_type: The type to be serialized from.
666
596
  :rtype: str, dict
667
- :raises: SerializationError if serialization fails.
597
+ :raises SerializationError: if serialization fails.
668
598
  :returns: The serialized data.
669
599
  """
670
600
  key_transformer = kwargs.get("key_transformer", self.key_transformer)
@@ -787,8 +717,8 @@ class Serializer: # pylint: disable=too-many-public-methods
787
717
  :param object data: The data to be serialized.
788
718
  :param str data_type: The type to be serialized from.
789
719
  :rtype: dict
790
- :raises: SerializationError if serialization fails.
791
- :raises: ValueError if data is None
720
+ :raises SerializationError: if serialization fails.
721
+ :raises ValueError: if data is None
792
722
  :returns: The serialized request body
793
723
  """
794
724
 
@@ -838,8 +768,8 @@ class Serializer: # pylint: disable=too-many-public-methods
838
768
  :param str data_type: The type to be serialized from.
839
769
  :rtype: str
840
770
  :returns: The serialized URL path
841
- :raises: TypeError if serialization fails.
842
- :raises: ValueError if data is None
771
+ :raises TypeError: if serialization fails.
772
+ :raises ValueError: if data is None
843
773
  """
844
774
  try:
845
775
  output = self.serialize_data(data, data_type, **kwargs)
@@ -862,8 +792,8 @@ class Serializer: # pylint: disable=too-many-public-methods
862
792
  :param object data: The data to be serialized.
863
793
  :param str data_type: The type to be serialized from.
864
794
  :rtype: str, list
865
- :raises: TypeError if serialization fails.
866
- :raises: ValueError if data is None
795
+ :raises TypeError: if serialization fails.
796
+ :raises ValueError: if data is None
867
797
  :returns: The serialized query parameter
868
798
  """
869
799
  try:
@@ -894,8 +824,8 @@ class Serializer: # pylint: disable=too-many-public-methods
894
824
  :param object data: The data to be serialized.
895
825
  :param str data_type: The type to be serialized from.
896
826
  :rtype: str
897
- :raises: TypeError if serialization fails.
898
- :raises: ValueError if data is None
827
+ :raises TypeError: if serialization fails.
828
+ :raises ValueError: if data is None
899
829
  :returns: The serialized header
900
830
  """
901
831
  try:
@@ -914,9 +844,9 @@ class Serializer: # pylint: disable=too-many-public-methods
914
844
 
915
845
  :param object data: The data to be serialized.
916
846
  :param str data_type: The type to be serialized from.
917
- :raises: AttributeError if required data is None.
918
- :raises: ValueError if data is None
919
- :raises: SerializationError if serialization fails.
847
+ :raises AttributeError: if required data is None.
848
+ :raises ValueError: if data is None
849
+ :raises SerializationError: if serialization fails.
920
850
  :returns: The serialized data.
921
851
  :rtype: str, int, float, bool, dict, list
922
852
  """
@@ -1269,7 +1199,7 @@ class Serializer: # pylint: disable=too-many-public-methods
1269
1199
 
1270
1200
  :param Datetime attr: Object to be serialized.
1271
1201
  :rtype: str
1272
- :raises: TypeError if format invalid.
1202
+ :raises TypeError: if format invalid.
1273
1203
  :return: serialized rfc
1274
1204
  """
1275
1205
  try:
@@ -1295,7 +1225,7 @@ class Serializer: # pylint: disable=too-many-public-methods
1295
1225
 
1296
1226
  :param Datetime attr: Object to be serialized.
1297
1227
  :rtype: str
1298
- :raises: SerializationError if format invalid.
1228
+ :raises SerializationError: if format invalid.
1299
1229
  :return: serialized iso
1300
1230
  """
1301
1231
  if isinstance(attr, str):
@@ -1333,7 +1263,7 @@ class Serializer: # pylint: disable=too-many-public-methods
1333
1263
 
1334
1264
  :param Datetime attr: Object to be serialized.
1335
1265
  :rtype: int
1336
- :raises: SerializationError if format invalid
1266
+ :raises SerializationError: if format invalid
1337
1267
  :return: serialied unix
1338
1268
  """
1339
1269
  if isinstance(attr, int):
@@ -1585,7 +1515,7 @@ class Deserializer:
1585
1515
  :param str target_obj: Target data type to deserialize to.
1586
1516
  :param requests.Response response_data: REST response object.
1587
1517
  :param str content_type: Swagger "produces" if available.
1588
- :raises: DeserializationError if deserialization fails.
1518
+ :raises DeserializationError: if deserialization fails.
1589
1519
  :return: Deserialized object.
1590
1520
  :rtype: object
1591
1521
  """
@@ -1601,7 +1531,7 @@ class Deserializer:
1601
1531
 
1602
1532
  :param str target_obj: Target data type to deserialize to.
1603
1533
  :param object data: Object to deserialize.
1604
- :raises: DeserializationError if deserialization fails.
1534
+ :raises DeserializationError: if deserialization fails.
1605
1535
  :return: Deserialized object.
1606
1536
  :rtype: object
1607
1537
  """
@@ -1841,7 +1771,7 @@ class Deserializer:
1841
1771
 
1842
1772
  :param str data: The response string to be deserialized.
1843
1773
  :param str data_type: The type to deserialize to.
1844
- :raises: DeserializationError if deserialization fails.
1774
+ :raises DeserializationError: if deserialization fails.
1845
1775
  :return: Deserialized object.
1846
1776
  :rtype: object
1847
1777
  """
@@ -1942,7 +1872,7 @@ class Deserializer:
1942
1872
  :param dict attr: Dictionary to be deserialized.
1943
1873
  :return: Deserialized object.
1944
1874
  :rtype: dict
1945
- :raises: TypeError if non-builtin datatype encountered.
1875
+ :raises TypeError: if non-builtin datatype encountered.
1946
1876
  """
1947
1877
  if attr is None:
1948
1878
  return None
@@ -1990,7 +1920,7 @@ class Deserializer:
1990
1920
  :param str data_type: deserialization data type.
1991
1921
  :return: Deserialized basic type.
1992
1922
  :rtype: str, int, float or bool
1993
- :raises: TypeError if string format is not valid.
1923
+ :raises TypeError: if string format is not valid.
1994
1924
  """
1995
1925
  # If we're here, data is supposed to be a basic type.
1996
1926
  # If it's still an XML node, take the text
@@ -2085,7 +2015,7 @@ class Deserializer:
2085
2015
  :param str attr: response string to be deserialized.
2086
2016
  :return: Deserialized bytearray
2087
2017
  :rtype: bytearray
2088
- :raises: TypeError if string format invalid.
2018
+ :raises TypeError: if string format invalid.
2089
2019
  """
2090
2020
  if isinstance(attr, ET.Element):
2091
2021
  attr = attr.text
@@ -2098,7 +2028,7 @@ class Deserializer:
2098
2028
  :param str attr: response string to be deserialized.
2099
2029
  :return: Deserialized base64 string
2100
2030
  :rtype: bytearray
2101
- :raises: TypeError if string format invalid.
2031
+ :raises TypeError: if string format invalid.
2102
2032
  """
2103
2033
  if isinstance(attr, ET.Element):
2104
2034
  attr = attr.text
@@ -2113,7 +2043,7 @@ class Deserializer:
2113
2043
 
2114
2044
  :param str attr: response string to be deserialized.
2115
2045
  :return: Deserialized decimal
2116
- :raises: DeserializationError if string format invalid.
2046
+ :raises DeserializationError: if string format invalid.
2117
2047
  :rtype: decimal
2118
2048
  """
2119
2049
  if isinstance(attr, ET.Element):
@@ -2131,7 +2061,7 @@ class Deserializer:
2131
2061
  :param str attr: response string to be deserialized.
2132
2062
  :return: Deserialized int
2133
2063
  :rtype: long or int
2134
- :raises: ValueError if string format invalid.
2064
+ :raises ValueError: if string format invalid.
2135
2065
  """
2136
2066
  if isinstance(attr, ET.Element):
2137
2067
  attr = attr.text
@@ -2144,7 +2074,7 @@ class Deserializer:
2144
2074
  :param str attr: response string to be deserialized.
2145
2075
  :return: Deserialized duration
2146
2076
  :rtype: TimeDelta
2147
- :raises: DeserializationError if string format invalid.
2077
+ :raises DeserializationError: if string format invalid.
2148
2078
  """
2149
2079
  if isinstance(attr, ET.Element):
2150
2080
  attr = attr.text
@@ -2162,7 +2092,7 @@ class Deserializer:
2162
2092
  :param str attr: response string to be deserialized.
2163
2093
  :return: Deserialized date
2164
2094
  :rtype: Date
2165
- :raises: DeserializationError if string format invalid.
2095
+ :raises DeserializationError: if string format invalid.
2166
2096
  """
2167
2097
  if isinstance(attr, ET.Element):
2168
2098
  attr = attr.text
@@ -2180,7 +2110,7 @@ class Deserializer:
2180
2110
  :param str attr: response string to be deserialized.
2181
2111
  :return: Deserialized time
2182
2112
  :rtype: datetime.time
2183
- :raises: DeserializationError if string format invalid.
2113
+ :raises DeserializationError: if string format invalid.
2184
2114
  """
2185
2115
  if isinstance(attr, ET.Element):
2186
2116
  attr = attr.text
@@ -2197,7 +2127,7 @@ class Deserializer:
2197
2127
  :param str attr: response string to be deserialized.
2198
2128
  :return: Deserialized RFC datetime
2199
2129
  :rtype: Datetime
2200
- :raises: DeserializationError if string format invalid.
2130
+ :raises DeserializationError: if string format invalid.
2201
2131
  """
2202
2132
  if isinstance(attr, ET.Element):
2203
2133
  attr = attr.text
@@ -2205,7 +2135,7 @@ class Deserializer:
2205
2135
  parsed_date = email.utils.parsedate_tz(attr) # type: ignore
2206
2136
  date_obj = datetime.datetime(
2207
2137
  *parsed_date[:6],
2208
- tzinfo=_FixedOffset(
2138
+ tzinfo=datetime.timezone(
2209
2139
  datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)
2210
2140
  ),
2211
2141
  )
@@ -2223,7 +2153,7 @@ class Deserializer:
2223
2153
  :param str attr: response string to be deserialized.
2224
2154
  :return: Deserialized ISO datetime
2225
2155
  :rtype: Datetime
2226
- :raises: DeserializationError if string format invalid.
2156
+ :raises DeserializationError: if string format invalid.
2227
2157
  """
2228
2158
  if isinstance(attr, ET.Element):
2229
2159
  attr = attr.text
@@ -2261,7 +2191,7 @@ class Deserializer:
2261
2191
  :param int attr: Object to be serialized.
2262
2192
  :return: Deserialized datetime
2263
2193
  :rtype: Datetime
2264
- :raises: DeserializationError if format invalid
2194
+ :raises DeserializationError: if format invalid
2265
2195
  """
2266
2196
  if isinstance(attr, ET.Element):
2267
2197
  attr = int(attr.text) # type: ignore
@@ -1,5 +1,5 @@
1
1
  # --------------------------------------------------------------------------
2
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.28.0)
2
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
3
3
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
4
4
  # --------------------------------------------------------------------------
5
5
 
@@ -1,6 +1,6 @@
1
1
  # coding=utf-8
2
2
  # --------------------------------------------------------------------------
3
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.28.0)
3
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
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.3, generator: @autorest/python@6.28.0)
3
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
4
4
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
5
5
  # --------------------------------------------------------------------------
6
6
 
@@ -1,6 +1,6 @@
1
1
  # coding=utf-8
2
2
  # --------------------------------------------------------------------------
3
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.28.0)
3
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
4
4
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
5
5
  # --------------------------------------------------------------------------
6
6
 
@@ -1,5 +1,5 @@
1
1
  # --------------------------------------------------------------------------
2
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.28.0)
2
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
3
3
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
4
4
  # --------------------------------------------------------------------------
5
5
 
@@ -1,6 +1,6 @@
1
1
  # coding=utf-8
2
2
  # --------------------------------------------------------------------------
3
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.28.0)
3
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
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,14 +1,14 @@
1
1
  # pylint: disable=too-many-lines
2
2
  # coding=utf-8
3
3
  # --------------------------------------------------------------------------
4
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.28.0)
4
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
5
5
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
6
6
  # --------------------------------------------------------------------------
7
7
  from io import IOBase
8
8
  import sys
9
9
  from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload
10
10
 
11
- from azure.core import MatchConditions
11
+ from azure.core import AsyncPipelineClient, MatchConditions
12
12
  from azure.core.exceptions import (
13
13
  ClientAuthenticationError,
14
14
  HttpResponseError,
@@ -24,6 +24,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async
24
24
  from azure.core.utils import case_insensitive_dict
25
25
 
26
26
  from ... import models as _models
27
+ from ..._serialization import Deserializer, Serializer
27
28
  from ...operations._operations import (
28
29
  build_auth_authorization_flow_complete_request,
29
30
  build_auth_authorization_flow_request,
@@ -51,6 +52,7 @@ from ...operations._operations import (
51
52
  build_well_known_installation_metadata_request,
52
53
  build_well_known_openid_configuration_request,
53
54
  )
55
+ from .._configuration import DiracConfiguration
54
56
  from .._vendor import raise_if_not_implemented
55
57
 
56
58
  if sys.version_info >= (3, 9):
@@ -78,10 +80,16 @@ class WellKnownOperations:
78
80
 
79
81
  def __init__(self, *args, **kwargs) -> None:
80
82
  input_args = list(args)
81
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
82
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
83
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
84
- self._deserialize = (
83
+ self._client: AsyncPipelineClient = (
84
+ input_args.pop(0) if input_args else kwargs.pop("client")
85
+ )
86
+ self._config: DiracConfiguration = (
87
+ input_args.pop(0) if input_args else kwargs.pop("config")
88
+ )
89
+ self._serialize: Serializer = (
90
+ input_args.pop(0) if input_args else kwargs.pop("serializer")
91
+ )
92
+ self._deserialize: Deserializer = (
85
93
  input_args.pop(0) if input_args else kwargs.pop("deserializer")
86
94
  )
87
95
 
@@ -202,10 +210,16 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
202
210
 
203
211
  def __init__(self, *args, **kwargs) -> None:
204
212
  input_args = list(args)
205
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
206
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
207
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
208
- self._deserialize = (
213
+ self._client: AsyncPipelineClient = (
214
+ input_args.pop(0) if input_args else kwargs.pop("client")
215
+ )
216
+ self._config: DiracConfiguration = (
217
+ input_args.pop(0) if input_args else kwargs.pop("config")
218
+ )
219
+ self._serialize: Serializer = (
220
+ input_args.pop(0) if input_args else kwargs.pop("serializer")
221
+ )
222
+ self._deserialize: Deserializer = (
209
223
  input_args.pop(0) if input_args else kwargs.pop("deserializer")
210
224
  )
211
225
 
@@ -820,10 +834,16 @@ class ConfigOperations:
820
834
 
821
835
  def __init__(self, *args, **kwargs) -> None:
822
836
  input_args = list(args)
823
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
824
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
825
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
826
- self._deserialize = (
837
+ self._client: AsyncPipelineClient = (
838
+ input_args.pop(0) if input_args else kwargs.pop("client")
839
+ )
840
+ self._config: DiracConfiguration = (
841
+ input_args.pop(0) if input_args else kwargs.pop("config")
842
+ )
843
+ self._serialize: Serializer = (
844
+ input_args.pop(0) if input_args else kwargs.pop("serializer")
845
+ )
846
+ self._deserialize: Deserializer = (
827
847
  input_args.pop(0) if input_args else kwargs.pop("deserializer")
828
848
  )
829
849
 
@@ -921,10 +941,16 @@ class JobsOperations:
921
941
 
922
942
  def __init__(self, *args, **kwargs) -> None:
923
943
  input_args = list(args)
924
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
925
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
926
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
927
- self._deserialize = (
944
+ self._client: AsyncPipelineClient = (
945
+ input_args.pop(0) if input_args else kwargs.pop("client")
946
+ )
947
+ self._config: DiracConfiguration = (
948
+ input_args.pop(0) if input_args else kwargs.pop("config")
949
+ )
950
+ self._serialize: Serializer = (
951
+ input_args.pop(0) if input_args else kwargs.pop("serializer")
952
+ )
953
+ self._deserialize: Deserializer = (
928
954
  input_args.pop(0) if input_args else kwargs.pop("deserializer")
929
955
  )
930
956
 
@@ -1,6 +1,6 @@
1
1
  # coding=utf-8
2
2
  # --------------------------------------------------------------------------
3
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.28.0)
3
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
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.3, generator: @autorest/python@6.28.0)
3
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
4
4
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
5
5
  # --------------------------------------------------------------------------
6
6
 
@@ -1,7 +1,7 @@
1
1
  # pylint: disable=too-many-lines
2
2
  # coding=utf-8
3
3
  # --------------------------------------------------------------------------
4
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.28.0)
4
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
5
5
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
6
6
  # --------------------------------------------------------------------------
7
7
 
@@ -1,6 +1,6 @@
1
1
  # coding=utf-8
2
2
  # --------------------------------------------------------------------------
3
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.28.0)
3
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
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,14 +1,14 @@
1
1
  # pylint: disable=too-many-lines
2
2
  # coding=utf-8
3
3
  # --------------------------------------------------------------------------
4
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.28.0)
4
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.28.3)
5
5
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
6
6
  # --------------------------------------------------------------------------
7
7
  from io import IOBase
8
8
  import sys
9
9
  from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload
10
10
 
11
- from azure.core import MatchConditions
11
+ from azure.core import MatchConditions, PipelineClient
12
12
  from azure.core.exceptions import (
13
13
  ClientAuthenticationError,
14
14
  HttpResponseError,
@@ -24,7 +24,8 @@ from azure.core.tracing.decorator import distributed_trace
24
24
  from azure.core.utils import case_insensitive_dict
25
25
 
26
26
  from .. import models as _models
27
- from .._serialization import Serializer
27
+ from .._configuration import DiracConfiguration
28
+ from .._serialization import Deserializer, Serializer
28
29
  from .._vendor import prep_if_match, prep_if_none_match, raise_if_not_implemented
29
30
 
30
31
  if sys.version_info >= (3, 9):
@@ -622,10 +623,16 @@ class WellKnownOperations:
622
623
 
623
624
  def __init__(self, *args, **kwargs):
624
625
  input_args = list(args)
625
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
626
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
627
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
628
- self._deserialize = (
626
+ self._client: PipelineClient = (
627
+ input_args.pop(0) if input_args else kwargs.pop("client")
628
+ )
629
+ self._config: DiracConfiguration = (
630
+ input_args.pop(0) if input_args else kwargs.pop("config")
631
+ )
632
+ self._serialize: Serializer = (
633
+ input_args.pop(0) if input_args else kwargs.pop("serializer")
634
+ )
635
+ self._deserialize: Deserializer = (
629
636
  input_args.pop(0) if input_args else kwargs.pop("deserializer")
630
637
  )
631
638
 
@@ -746,10 +753,16 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
746
753
 
747
754
  def __init__(self, *args, **kwargs):
748
755
  input_args = list(args)
749
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
750
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
751
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
752
- self._deserialize = (
756
+ self._client: PipelineClient = (
757
+ input_args.pop(0) if input_args else kwargs.pop("client")
758
+ )
759
+ self._config: DiracConfiguration = (
760
+ input_args.pop(0) if input_args else kwargs.pop("config")
761
+ )
762
+ self._serialize: Serializer = (
763
+ input_args.pop(0) if input_args else kwargs.pop("serializer")
764
+ )
765
+ self._deserialize: Deserializer = (
753
766
  input_args.pop(0) if input_args else kwargs.pop("deserializer")
754
767
  )
755
768
 
@@ -1364,10 +1377,16 @@ class ConfigOperations:
1364
1377
 
1365
1378
  def __init__(self, *args, **kwargs):
1366
1379
  input_args = list(args)
1367
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
1368
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
1369
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
1370
- self._deserialize = (
1380
+ self._client: PipelineClient = (
1381
+ input_args.pop(0) if input_args else kwargs.pop("client")
1382
+ )
1383
+ self._config: DiracConfiguration = (
1384
+ input_args.pop(0) if input_args else kwargs.pop("config")
1385
+ )
1386
+ self._serialize: Serializer = (
1387
+ input_args.pop(0) if input_args else kwargs.pop("serializer")
1388
+ )
1389
+ self._deserialize: Deserializer = (
1371
1390
  input_args.pop(0) if input_args else kwargs.pop("deserializer")
1372
1391
  )
1373
1392
 
@@ -1465,10 +1484,16 @@ class JobsOperations:
1465
1484
 
1466
1485
  def __init__(self, *args, **kwargs):
1467
1486
  input_args = list(args)
1468
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
1469
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
1470
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
1471
- self._deserialize = (
1487
+ self._client: PipelineClient = (
1488
+ input_args.pop(0) if input_args else kwargs.pop("client")
1489
+ )
1490
+ self._config: DiracConfiguration = (
1491
+ input_args.pop(0) if input_args else kwargs.pop("config")
1492
+ )
1493
+ self._serialize: Serializer = (
1494
+ input_args.pop(0) if input_args else kwargs.pop("serializer")
1495
+ )
1496
+ self._deserialize: Deserializer = (
1472
1497
  input_args.pop(0) if input_args else kwargs.pop("deserializer")
1473
1498
  )
1474
1499
 
@@ -7,8 +7,8 @@ import fcntl
7
7
  import json
8
8
  import os
9
9
  from diracx.core.utils import EXPIRES_GRACE_SECONDS, serialize_credentials
10
+ import httpx
10
11
  import jwt
11
- import requests
12
12
 
13
13
  from datetime import datetime, timezone
14
14
  from importlib.metadata import PackageNotFoundError, distribution
@@ -43,11 +43,11 @@ def get_openid_configuration(
43
43
  endpoint: str, *, verify: bool | str = True
44
44
  ) -> Dict[str, str]:
45
45
  """Get the openid configuration from the .well-known endpoint"""
46
- response = requests.get(
46
+ response = httpx.get(
47
47
  url=parse.urljoin(endpoint, ".well-known/openid-configuration"),
48
48
  verify=verify,
49
49
  )
50
- if not response.ok:
50
+ if not response.is_success:
51
51
  raise RuntimeError("Cannot fetch any information from the .well-known endpoint")
52
52
  return response.json()
53
53
 
@@ -123,7 +123,7 @@ def refresh_token(
123
123
  verify: bool | str = True,
124
124
  ) -> TokenResponse:
125
125
  """Refresh the access token using the refresh_token flow."""
126
- response = requests.post(
126
+ response = httpx.post(
127
127
  url=token_endpoint,
128
128
  data={
129
129
  "client_id": client_id,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: diracx-client
3
- Version: 0.0.1a25
3
+ Version: 0.0.1a27
4
4
  Summary: TODO
5
5
  License: GPL-3.0-only
6
6
  Classifier: Intended Audience :: Science/Research
@@ -13,8 +13,7 @@ Description-Content-Type: text/markdown
13
13
  Requires-Dist: azure-core
14
14
  Requires-Dist: diracx-core
15
15
  Requires-Dist: isodate
16
- Requires-Dist: requests
16
+ Requires-Dist: httpx
17
17
  Provides-Extra: testing
18
18
  Requires-Dist: diracx-testing; extra == "testing"
19
19
  Provides-Extra: types
20
- Requires-Dist: types-requests; extra == "types"
@@ -0,0 +1,36 @@
1
+ diracx/client/__init__.py,sha256=aLo7lP4xwlCtxs7MKD55gr2oDLQyWEvRHZVHwj5Sl2c,165
2
+ diracx/client/aio.py,sha256=B6OCJPdz44PyhCODhLHy3QOquZ8DSwFTjKGV_bkBP7A,65
3
+ diracx/client/extensions.py,sha256=igHJAXhgpYQq-Di1ZOX2b2okqgjQHTs9HL8mBTHb6ss,3385
4
+ diracx/client/models.py,sha256=pyvpMz2nPuqGKZsvjffD3qs56eZHh40xiRS4zT9CSqA,203
5
+ diracx/client/py.typed,sha256=bWew9mHgMy8LqMu7RuqQXFXLBxh2CRx0dUbSx-3wE48,27
6
+ diracx/client/generated/__init__.py,sha256=6h-55YmMsvbdKE3SylfhjjQDQ7Ijb6QPIDSe8cXQEs4,854
7
+ diracx/client/generated/_client.py,sha256=wwGe8hqjF50NdsZF98iV22aPqy2xGUJBgF1ikTHGhg4,4831
8
+ diracx/client/generated/_configuration.py,sha256=fqdE0GqVtFzVlEOUfbo24vtFI9_LJMSSNl-c9OWujAs,1936
9
+ diracx/client/generated/_patch.py,sha256=-LIKKr5s3P-oozD0LCgGCG1Ug8EnzKhZszYUTjOFo-A,1325
10
+ diracx/client/generated/_serialization.py,sha256=t5mrJuw3koh6QY6I8O-X4R241F9xanMWtiYFB5WJa5s,85190
11
+ diracx/client/generated/_vendor.py,sha256=3HOYl2DRHSySTR8ryKHwI3V011A0TIWuWYst46ekM6I,1936
12
+ diracx/client/generated/py.typed,sha256=bWew9mHgMy8LqMu7RuqQXFXLBxh2CRx0dUbSx-3wE48,27
13
+ diracx/client/generated/aio/__init__.py,sha256=6h-55YmMsvbdKE3SylfhjjQDQ7Ijb6QPIDSe8cXQEs4,854
14
+ diracx/client/generated/aio/_client.py,sha256=8AaJdFznOxvdyz1F5JXQTxG42IuvFAG1sJbtvTdH_3o,4952
15
+ diracx/client/generated/aio/_configuration.py,sha256=fxC1sqgUUXAYx5YdxcEdfwLnFO8fOXoOLt8Cw7pncTM,1968
16
+ diracx/client/generated/aio/_patch.py,sha256=6FYNV6Yt0ttTc7A5EQui764Ujuzypkjpv47LVdccmD8,697
17
+ diracx/client/generated/aio/_vendor.py,sha256=3HOYl2DRHSySTR8ryKHwI3V011A0TIWuWYst46ekM6I,1936
18
+ diracx/client/generated/aio/operations/__init__.py,sha256=6AvFaBTJZNwv9pbYwLlqewKey8KJgp9SvG649X1OXI0,1070
19
+ diracx/client/generated/aio/operations/_operations.py,sha256=ofYvcd4eyPOcyZZuunYbIvxGxW2apz_K3uTgrAQaFxU,68772
20
+ diracx/client/generated/aio/operations/_patch.py,sha256=3oHjHqBF7DXruMSVUTRxW0Xpv_mY1WaB8iyo47YBTec,4229
21
+ diracx/client/generated/models/__init__.py,sha256=98hV0OWrJ3CXju26BybKXAnuiXS7pP4duPiMnmpH32A,2512
22
+ diracx/client/generated/models/_enums.py,sha256=Sn5mdwyKabEDmScDxXlku6gn9E3w3UNcVFqS_fjl-Hc,1738
23
+ diracx/client/generated/models/_models.py,sha256=S9e5VBN6CYEceTegexOszePOOXmSKXVMU6JAQoTPsDk,36407
24
+ diracx/client/generated/models/_patch.py,sha256=uvLwKzjWO_t-VZ4aSuLhuJ05RVxAP9UJxZV3XDeGMnU,1497
25
+ diracx/client/generated/operations/__init__.py,sha256=6AvFaBTJZNwv9pbYwLlqewKey8KJgp9SvG649X1OXI0,1070
26
+ diracx/client/generated/operations/_operations.py,sha256=9mmi4js6kNNA3S4D-703VxiibRRE5S6FqpXnzPOMLjA,85215
27
+ diracx/client/generated/operations/_patch.py,sha256=FvemlcswH_zZkdyoGObyTwRnwTsYIZJa3seO66C2BQI,4202
28
+ diracx/client/patches/__init__.py,sha256=8mzMyg1Kd9lJH1K7DYJ6FgjkTJgPRJmF0sYmuFv5wcs,468
29
+ diracx/client/patches/utils.py,sha256=OXJx-jSwou-BQm3PrOaZgRWLj-8EFXgjTDVms6uWdN4,10732
30
+ diracx/client/patches/aio/__init__.py,sha256=qIy1qj8HzaZDEU2PCjEHjFbylwfYRAM0i90WEDs2WuQ,471
31
+ diracx/client/patches/aio/utils.py,sha256=Bno4DntLGWEB88UO9eaBtZjG8K3QAJNaT2RI-_mQWgc,5949
32
+ diracx_client-0.0.1a27.dist-info/METADATA,sha256=NHiCZBHyFwS-eGACm90ujpPxr_PZ_ssiyZ-1i9G4LGQ,625
33
+ diracx_client-0.0.1a27.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
34
+ diracx_client-0.0.1a27.dist-info/entry_points.txt,sha256=NP67B7z-VIy8vEG3ZYtOAyxZqLtrOAD5hh2pA2AFBKI,123
35
+ diracx_client-0.0.1a27.dist-info/top_level.txt,sha256=vJx10tdRlBX3rF2Psgk5jlwVGZNcL3m_7iQWwgPXt-U,7
36
+ diracx_client-0.0.1a27.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (75.8.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,36 +0,0 @@
1
- diracx/client/__init__.py,sha256=aLo7lP4xwlCtxs7MKD55gr2oDLQyWEvRHZVHwj5Sl2c,165
2
- diracx/client/aio.py,sha256=B6OCJPdz44PyhCODhLHy3QOquZ8DSwFTjKGV_bkBP7A,65
3
- diracx/client/extensions.py,sha256=igHJAXhgpYQq-Di1ZOX2b2okqgjQHTs9HL8mBTHb6ss,3385
4
- diracx/client/models.py,sha256=pyvpMz2nPuqGKZsvjffD3qs56eZHh40xiRS4zT9CSqA,203
5
- diracx/client/py.typed,sha256=bWew9mHgMy8LqMu7RuqQXFXLBxh2CRx0dUbSx-3wE48,27
6
- diracx/client/generated/__init__.py,sha256=W6Pp6RirqNtSV_YQJ3z9uaDBS8D5jgaRct5Cd_VYDPI,854
7
- diracx/client/generated/_client.py,sha256=-mpbNRpCAFionjU51Ta9bbXAddlUG1FMsbXuswxyQh4,4831
8
- diracx/client/generated/_configuration.py,sha256=GHQujimTCX1FGKlNsF1xasEV9OEaOuWKAtfQ3ymKyK8,1936
9
- diracx/client/generated/_patch.py,sha256=ZsuUeieEbKp0OjXJz2qAW-z6W0Xt8wwb38J-RvQxfNE,1328
10
- diracx/client/generated/_serialization.py,sha256=xx1ZQCrGqaBTG6N7TNUFRw7FT09rzJhpl33o6M_Fi88,86947
11
- diracx/client/generated/_vendor.py,sha256=mxxhXPZrTfoctsfkug4YQ57E9rWT59BMm25ZFBWhzSU,1936
12
- diracx/client/generated/py.typed,sha256=bWew9mHgMy8LqMu7RuqQXFXLBxh2CRx0dUbSx-3wE48,27
13
- diracx/client/generated/aio/__init__.py,sha256=W6Pp6RirqNtSV_YQJ3z9uaDBS8D5jgaRct5Cd_VYDPI,854
14
- diracx/client/generated/aio/_client.py,sha256=EZbIeNY9NVixnoKYMT1TDSTe0ZhxLihpYZOIq8FcUL8,4952
15
- diracx/client/generated/aio/_configuration.py,sha256=h7uHvQdqptdwMZGXqeTvnv0nf9ADEHC1d3Uhbzx0Cis,1968
16
- diracx/client/generated/aio/_patch.py,sha256=6FYNV6Yt0ttTc7A5EQui764Ujuzypkjpv47LVdccmD8,697
17
- diracx/client/generated/aio/_vendor.py,sha256=mxxhXPZrTfoctsfkug4YQ57E9rWT59BMm25ZFBWhzSU,1936
18
- diracx/client/generated/aio/operations/__init__.py,sha256=KMYBno-tRVf6j-L-xEEEcwUMyBOI6RlWAe-Ed5IhUE8,1070
19
- diracx/client/generated/aio/operations/_operations.py,sha256=5Q8PXz1O4IIukxyWjRH3xQabBlb8LqdsJKpBV55jpRI,68092
20
- diracx/client/generated/aio/operations/_patch.py,sha256=3oHjHqBF7DXruMSVUTRxW0Xpv_mY1WaB8iyo47YBTec,4229
21
- diracx/client/generated/models/__init__.py,sha256=Lc1kmmSj5JnKbszdTM-NaAKvf_TJ0AOnst7I6fjFaSs,2512
22
- diracx/client/generated/models/_enums.py,sha256=975wVII54zIBiLR2-0C1gbGTJs7HuxCoWe87m1DJ3Go,1738
23
- diracx/client/generated/models/_models.py,sha256=v5GyCjh7XrxNozMa7zUcnNzfptmmyHZT1GIqf4-CjHc,36407
24
- diracx/client/generated/models/_patch.py,sha256=uvLwKzjWO_t-VZ4aSuLhuJ05RVxAP9UJxZV3XDeGMnU,1497
25
- diracx/client/generated/operations/__init__.py,sha256=KMYBno-tRVf6j-L-xEEEcwUMyBOI6RlWAe-Ed5IhUE8,1070
26
- diracx/client/generated/operations/_operations.py,sha256=r8F92Xa-TWvO6Z8Y_5vjq9l9X8sEu-mi0PGF8woNnjI,84601
27
- diracx/client/generated/operations/_patch.py,sha256=FvemlcswH_zZkdyoGObyTwRnwTsYIZJa3seO66C2BQI,4202
28
- diracx/client/patches/__init__.py,sha256=8mzMyg1Kd9lJH1K7DYJ6FgjkTJgPRJmF0sYmuFv5wcs,468
29
- diracx/client/patches/utils.py,sha256=7VaGp7IoAMMfotW3N9BrMb7h59mHjfkGgwFnLnIdNEs,10733
30
- diracx/client/patches/aio/__init__.py,sha256=qIy1qj8HzaZDEU2PCjEHjFbylwfYRAM0i90WEDs2WuQ,471
31
- diracx/client/patches/aio/utils.py,sha256=Bno4DntLGWEB88UO9eaBtZjG8K3QAJNaT2RI-_mQWgc,5949
32
- diracx_client-0.0.1a25.dist-info/METADATA,sha256=DZ0N6Bk5jjTut6eH5rlN2gS5aZvTu-Y5QOSM_l6PHD8,676
33
- diracx_client-0.0.1a25.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
34
- diracx_client-0.0.1a25.dist-info/entry_points.txt,sha256=NP67B7z-VIy8vEG3ZYtOAyxZqLtrOAD5hh2pA2AFBKI,123
35
- diracx_client-0.0.1a25.dist-info/top_level.txt,sha256=vJx10tdRlBX3rF2Psgk5jlwVGZNcL3m_7iQWwgPXt-U,7
36
- diracx_client-0.0.1a25.dist-info/RECORD,,