teamdbapi 2.37.1__py3-none-any.whl → 3.0.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.
Files changed (94) hide show
  1. teamdbapi/__init__.py +11 -0
  2. teamdbapi/api/__init__.py +39 -34
  3. teamdbapi/api/assembly_api.py +2108 -2108
  4. teamdbapi/api/car_api.py +874 -874
  5. teamdbapi/api/component_api.py +954 -0
  6. teamdbapi/api/config_api.py +118 -118
  7. teamdbapi/api/criteria_api.py +126 -0
  8. teamdbapi/api/edit_api.py +433 -433
  9. teamdbapi/api/event_api.py +878 -878
  10. teamdbapi/api/fixed_field_api.py +320 -320
  11. teamdbapi/api/group_api.py +609 -609
  12. teamdbapi/api/import_export_api.py +828 -743
  13. teamdbapi/api/lap_api.py +708 -708
  14. teamdbapi/api/lap_report_api.py +490 -486
  15. teamdbapi/api/model_field_api.py +708 -708
  16. teamdbapi/api/mounting_api.py +219 -0
  17. teamdbapi/api/notes_authorization_api.py +324 -324
  18. teamdbapi/api/parameter_api.py +1176 -1176
  19. teamdbapi/api/part_api.py +304 -0
  20. teamdbapi/api/report_api.py +142 -142
  21. teamdbapi/api/revision_api.py +1420 -1420
  22. teamdbapi/api/revision_editor_selector_api.py +990 -990
  23. teamdbapi/api/run_api.py +603 -603
  24. teamdbapi/api/script_api.py +490 -490
  25. teamdbapi/api/session_api.py +720 -720
  26. teamdbapi/api/target_api.py +415 -415
  27. teamdbapi/api/team_db_list_api.py +987 -987
  28. teamdbapi/api/team_db_view_api.py +482 -482
  29. teamdbapi/api/tire_api.py +599 -599
  30. teamdbapi/api/tire_set_api.py +514 -514
  31. teamdbapi/api/track_api.py +506 -506
  32. teamdbapi/api/track_layout_api.py +514 -514
  33. teamdbapi/api/update_request_api.py +235 -0
  34. teamdbapi/api/user_api.py +474 -474
  35. teamdbapi/api/value_field_api.py +558 -558
  36. teamdbapi/api/version_api.py +449 -449
  37. teamdbapi/api_client.py +4 -8
  38. teamdbapi/configuration.py +6 -13
  39. teamdbapi/models/__init__.py +6 -0
  40. teamdbapi/models/assembly.py +1 -0
  41. teamdbapi/models/bleed_adjustment.py +1 -0
  42. teamdbapi/models/calibration.py +1 -0
  43. teamdbapi/models/car.py +1 -0
  44. teamdbapi/models/car_parameters_context.py +1 -0
  45. teamdbapi/models/compare_options.py +1 -0
  46. teamdbapi/models/compare_result.py +1 -0
  47. teamdbapi/models/compare_result_detail.py +2 -0
  48. teamdbapi/models/component.py +1217 -0
  49. teamdbapi/models/copy_from_tags_args.py +2 -0
  50. teamdbapi/models/couple_guid_text.py +1 -0
  51. teamdbapi/models/criteria.py +430 -0
  52. teamdbapi/models/criteria_value.py +197 -0
  53. teamdbapi/models/event.py +1 -0
  54. teamdbapi/models/fixed_field.py +2 -1
  55. teamdbapi/models/group.py +1 -0
  56. teamdbapi/models/import_parameters_args.py +1 -0
  57. teamdbapi/models/import_parameters_results.py +2 -0
  58. teamdbapi/models/item_value.py +1 -0
  59. teamdbapi/models/item_value_key.py +1 -0
  60. teamdbapi/models/lap.py +1 -0
  61. teamdbapi/models/lap_report_options.py +1 -0
  62. teamdbapi/models/model_field.py +3 -1
  63. teamdbapi/models/model_field_authorization.py +1 -0
  64. teamdbapi/models/mounting.py +489 -0
  65. teamdbapi/models/notes_authorization.py +1 -0
  66. teamdbapi/models/notes_context.py +1 -0
  67. teamdbapi/models/parameter.py +2 -0
  68. teamdbapi/models/parameter_cross_table.py +1 -0
  69. teamdbapi/models/part.py +963 -0
  70. teamdbapi/models/part_count.py +228 -0
  71. teamdbapi/models/problem_details.py +2 -6
  72. teamdbapi/models/revision.py +88 -3
  73. teamdbapi/models/revision_value.py +1 -0
  74. teamdbapi/models/run.py +1 -0
  75. teamdbapi/models/script.py +1 -0
  76. teamdbapi/models/session.py +1 -0
  77. teamdbapi/models/string_with_font_style.py +1 -0
  78. teamdbapi/models/target.py +64 -7
  79. teamdbapi/models/team_db_list.py +1 -0
  80. teamdbapi/models/team_db_list_item.py +1 -0
  81. teamdbapi/models/tire.py +2 -0
  82. teamdbapi/models/tire_set.py +2 -0
  83. teamdbapi/models/track.py +1 -0
  84. teamdbapi/models/track_layout.py +1 -0
  85. teamdbapi/models/user.py +1 -0
  86. teamdbapi/models/user_group.py +1 -0
  87. teamdbapi/models/value_field.py +1 -0
  88. teamdbapi/models/version.py +1 -0
  89. teamdbapi/rest.py +6 -1
  90. {teamdbapi-2.37.1.dist-info → teamdbapi-3.0.0.dist-info}/METADATA +5 -5
  91. teamdbapi-3.0.0.dist-info/RECORD +93 -0
  92. teamdbapi-2.37.1.dist-info/RECORD +0 -82
  93. {teamdbapi-2.37.1.dist-info → teamdbapi-3.0.0.dist-info}/LICENSE +0 -0
  94. {teamdbapi-2.37.1.dist-info → teamdbapi-3.0.0.dist-info}/WHEEL +0 -0
teamdbapi/api_client.py CHANGED
@@ -523,14 +523,10 @@ class ApiClient(object):
523
523
  filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
524
524
  content_disposition).group(1)
525
525
  path = os.path.join(os.path.dirname(path), filename)
526
- response_data = response.data
527
- with open(path, "wb") as f:
528
- if isinstance(response_data, str):
529
- # change str to bytes so we can write it
530
- response_data = response_data.encode('utf-8')
531
- f.write(response_data)
532
- else:
533
- f.write(response_data)
526
+
527
+ with open(path, "wb") as f:
528
+ f.write(response.data)
529
+
534
530
  return path
535
531
 
536
532
  def __deserialize_primitive(self, data, klass):
@@ -46,7 +46,7 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
46
46
  def __init__(self):
47
47
  """Constructor"""
48
48
  # Default Base url
49
- self.host = "http://localhost:9001"
49
+ self.host = "/"
50
50
  # Temp file folder for downloading files
51
51
  self.temp_folder_path = None
52
52
 
@@ -55,8 +55,6 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
55
55
  self.api_key = {}
56
56
  # dict to store API prefix (e.g. Bearer)
57
57
  self.api_key_prefix = {}
58
- # function to refresh API key if expired
59
- self.refresh_api_key_hook = None
60
58
  # Username for HTTP basic authentication
61
59
  self.username = ""
62
60
  # Password for HTTP basic authentication
@@ -203,16 +201,11 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
203
201
  :param identifier: The identifier of apiKey.
204
202
  :return: The token for api key authentication.
205
203
  """
206
- if self.refresh_api_key_hook:
207
- self.refresh_api_key_hook(self)
208
-
209
- key = self.api_key.get(identifier)
210
- if key:
211
- prefix = self.api_key_prefix.get(identifier)
212
- if prefix:
213
- return "%s %s" % (prefix, key)
214
- else:
215
- return key
204
+ if (self.api_key.get(identifier) and
205
+ self.api_key_prefix.get(identifier)):
206
+ return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501
207
+ elif self.api_key.get(identifier):
208
+ return self.api_key[identifier]
216
209
 
217
210
  def get_basic_auth_token(self):
218
211
  """Gets HTTP basic authentication header (string).
@@ -22,8 +22,11 @@ from teamdbapi.models.car_parameters_context import CarParametersContext
22
22
  from teamdbapi.models.compare_options import CompareOptions
23
23
  from teamdbapi.models.compare_result import CompareResult
24
24
  from teamdbapi.models.compare_result_detail import CompareResultDetail
25
+ from teamdbapi.models.component import Component
25
26
  from teamdbapi.models.copy_from_tags_args import CopyFromTagsArgs
26
27
  from teamdbapi.models.couple_guid_text import CoupleGuidText
28
+ from teamdbapi.models.criteria import Criteria
29
+ from teamdbapi.models.criteria_value import CriteriaValue
27
30
  from teamdbapi.models.event import Event
28
31
  from teamdbapi.models.fixed_field import FixedField
29
32
  from teamdbapi.models.group import Group
@@ -35,10 +38,13 @@ from teamdbapi.models.lap import Lap
35
38
  from teamdbapi.models.lap_report_options import LapReportOptions
36
39
  from teamdbapi.models.model_field import ModelField
37
40
  from teamdbapi.models.model_field_authorization import ModelFieldAuthorization
41
+ from teamdbapi.models.mounting import Mounting
38
42
  from teamdbapi.models.notes_authorization import NotesAuthorization
39
43
  from teamdbapi.models.notes_context import NotesContext
40
44
  from teamdbapi.models.parameter import Parameter
41
45
  from teamdbapi.models.parameter_cross_table import ParameterCrossTable
46
+ from teamdbapi.models.part import Part
47
+ from teamdbapi.models.part_count import PartCount
42
48
  from teamdbapi.models.problem_details import ProblemDetails
43
49
  from teamdbapi.models.revision import Revision
44
50
  from teamdbapi.models.revision_value import RevisionValue
@@ -15,6 +15,7 @@ import re # noqa: F401
15
15
 
16
16
  import six
17
17
 
18
+
18
19
  class Assembly(object):
19
20
  """NOTE: This class is auto generated by the swagger code generator program.
20
21
 
@@ -15,6 +15,7 @@ import re # noqa: F401
15
15
 
16
16
  import six
17
17
 
18
+
18
19
  class BleedAdjustment(object):
19
20
  """NOTE: This class is auto generated by the swagger code generator program.
20
21
 
@@ -15,6 +15,7 @@ import re # noqa: F401
15
15
 
16
16
  import six
17
17
 
18
+
18
19
  class Calibration(object):
19
20
  """NOTE: This class is auto generated by the swagger code generator program.
20
21
 
teamdbapi/models/car.py CHANGED
@@ -15,6 +15,7 @@ import re # noqa: F401
15
15
 
16
16
  import six
17
17
 
18
+
18
19
  class Car(object):
19
20
  """NOTE: This class is auto generated by the swagger code generator program.
20
21
 
@@ -15,6 +15,7 @@ import re # noqa: F401
15
15
 
16
16
  import six
17
17
 
18
+
18
19
  class CarParametersContext(object):
19
20
  """NOTE: This class is auto generated by the swagger code generator program.
20
21
 
@@ -15,6 +15,7 @@ import re # noqa: F401
15
15
 
16
16
  import six
17
17
 
18
+
18
19
  class CompareOptions(object):
19
20
  """NOTE: This class is auto generated by the swagger code generator program.
20
21
 
@@ -15,6 +15,7 @@ import re # noqa: F401
15
15
 
16
16
  import six
17
17
 
18
+
18
19
  class CompareResult(object):
19
20
  """NOTE: This class is auto generated by the swagger code generator program.
20
21
 
@@ -14,6 +14,8 @@ import pprint
14
14
  import re # noqa: F401
15
15
 
16
16
  import six
17
+ from teamdbapi.models.compare_result import CompareResult # noqa: F401,E501
18
+
17
19
 
18
20
  class CompareResultDetail(object):
19
21
  """NOTE: This class is auto generated by the swagger code generator program.