fiddler-client 3.14.1__tar.gz → 3.15.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.
Files changed (121) hide show
  1. {fiddler_client-3.14.1/fiddler_client.egg-info → fiddler_client-3.15.0}/PKG-INFO +3 -4
  2. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/PUBLIC.md +1 -1
  3. fiddler_client-3.15.0/fiddler/VERSION +1 -0
  4. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/exceptions.py +146 -140
  5. {fiddler_client-3.14.1 → fiddler_client-3.15.0/fiddler_client.egg-info}/PKG-INFO +3 -4
  6. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/pyproject.toml +6 -7
  7. fiddler_client-3.14.1/fiddler/VERSION +0 -1
  8. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/LICENSE.txt +0 -0
  9. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/README.md +0 -0
  10. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/__init__.py +0 -0
  11. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/configs.py +0 -0
  12. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/connection.py +0 -0
  13. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/constants/__init__.py +0 -0
  14. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/constants/alert_rule.py +0 -0
  15. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/constants/baseline.py +0 -0
  16. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/constants/common.py +0 -0
  17. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/constants/dataset.py +0 -0
  18. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/constants/events.py +0 -0
  19. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/constants/job.py +0 -0
  20. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/constants/model.py +0 -0
  21. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/constants/model_deployment.py +0 -0
  22. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/constants/xai.py +0 -0
  23. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/decorators.py +0 -0
  24. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/__init__.py +0 -0
  25. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/alert_record.py +0 -0
  26. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/alert_rule.py +0 -0
  27. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/base.py +0 -0
  28. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/baseline.py +0 -0
  29. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/custom_expression.py +0 -0
  30. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/dataset.py +0 -0
  31. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/events.py +0 -0
  32. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/file.py +0 -0
  33. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/job.py +0 -0
  34. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/model.py +0 -0
  35. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/model_artifact.py +0 -0
  36. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/model_deployment.py +0 -0
  37. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/organization.py +0 -0
  38. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/project.py +0 -0
  39. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/surrogate.py +0 -0
  40. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/user.py +0 -0
  41. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/webhook.py +0 -0
  42. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/entities/xai.py +0 -0
  43. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/libs/__init__.py +0 -0
  44. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/libs/aws.py +0 -0
  45. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/libs/http_client.py +0 -0
  46. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/libs/json_encoder.py +0 -0
  47. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/libs/semver.py +0 -0
  48. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/packtools/__init__.py +0 -0
  49. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/packtools/gem.py +0 -0
  50. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/packtools/keras_ig_helpers.py +0 -0
  51. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/packtools/project_attributions_helpers.py +0 -0
  52. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/packtools/template_model.py +0 -0
  53. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/__init__.py +0 -0
  54. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/alert_record.py +0 -0
  55. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/alert_rule.py +0 -0
  56. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/base.py +0 -0
  57. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/baseline.py +0 -0
  58. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/custom_expression.py +0 -0
  59. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/custom_features.py +0 -0
  60. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/dataset.py +0 -0
  61. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/events.py +0 -0
  62. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/file.py +0 -0
  63. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/filter_query.py +0 -0
  64. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/job.py +0 -0
  65. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/model.py +0 -0
  66. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/model_deployment.py +0 -0
  67. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/model_schema.py +0 -0
  68. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/model_spec.py +0 -0
  69. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/model_task_params.py +0 -0
  70. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/organization.py +0 -0
  71. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/project.py +0 -0
  72. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/response.py +0 -0
  73. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/server_info.py +0 -0
  74. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/user.py +0 -0
  75. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/webhook.py +0 -0
  76. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/xai.py +0 -0
  77. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/schemas/xai_params.py +0 -0
  78. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/__init__.py +0 -0
  79. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/__init__.py +0 -0
  80. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_alert_record.py +0 -0
  81. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_alert_rule.py +0 -0
  82. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_baseline.py +0 -0
  83. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_custom_metric.py +0 -0
  84. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_dataset.py +0 -0
  85. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_events.py +0 -0
  86. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_files.py +0 -0
  87. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_generate_model.py +0 -0
  88. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_job.py +0 -0
  89. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_mixin.py +0 -0
  90. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_model.py +0 -0
  91. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_model_artifact.py +0 -0
  92. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_model_deployment.py +0 -0
  93. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_model_surrogate.py +0 -0
  94. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_project.py +0 -0
  95. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_segment.py +0 -0
  96. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_webhook.py +0 -0
  97. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/apis/test_xai.py +0 -0
  98. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/artifact_test_dir/package.py +0 -0
  99. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/conftest.py +0 -0
  100. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/constants.py +0 -0
  101. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/test_connection.py +0 -0
  102. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/test_http_client_redaction.py +0 -0
  103. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/test_json_encoder.py +0 -0
  104. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/test_logger.py +0 -0
  105. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/test_sagemaker_auth.py +0 -0
  106. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/test_utils.py +0 -0
  107. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/tests/utils.py +0 -0
  108. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/utils/__init__.py +0 -0
  109. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/utils/column_generator.py +0 -0
  110. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/utils/decorators.py +0 -0
  111. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/utils/helpers.py +0 -0
  112. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/utils/logger.py +0 -0
  113. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/utils/model_generator.py +0 -0
  114. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/utils/validations.py +0 -0
  115. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/utils/version.py +0 -0
  116. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler/version.py +0 -0
  117. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler_client.egg-info/SOURCES.txt +0 -0
  118. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler_client.egg-info/dependency_links.txt +0 -0
  119. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler_client.egg-info/requires.txt +0 -0
  120. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/fiddler_client.egg-info/top_level.txt +0 -0
  121. {fiddler_client-3.14.1 → fiddler_client-3.15.0}/setup.cfg +0 -0
@@ -1,18 +1,17 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fiddler-client
3
- Version: 3.14.1
3
+ Version: 3.15.0
4
4
  Summary: Python client for Fiddler Platform
5
5
  Author: Fiddler Labs
6
6
  License-Expression: Apache-2.0
7
7
  Project-URL: Homepage, https://fiddler.ai
8
8
  Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.10
10
9
  Classifier: Programming Language :: Python :: 3.11
11
10
  Classifier: Programming Language :: Python :: 3.12
12
11
  Classifier: Programming Language :: Python :: 3.13
13
12
  Classifier: Programming Language :: Python :: 3.14
14
13
  Classifier: Operating System :: OS Independent
15
- Requires-Python: >=3.10
14
+ Requires-Python: >=3.11
16
15
  Description-Content-Type: text/markdown
17
16
  License-File: LICENSE.txt
18
17
  Requires-Dist: requests<3
@@ -58,7 +57,7 @@ pip install fiddler-client
58
57
 
59
58
  ## Requirements
60
59
 
61
- - Python 3.10 or higher
60
+ - Python 3.11 or higher
62
61
  - pip 19.0 or higher (latest release preferred)
63
62
 
64
63
  ## Quick Start
@@ -29,7 +29,7 @@ pip install fiddler-client
29
29
 
30
30
  ## Requirements
31
31
 
32
- - Python 3.10 or higher
32
+ - Python 3.11 or higher
33
33
  - pip 19.0 or higher (latest release preferred)
34
34
 
35
35
  ## Quick Start
@@ -0,0 +1 @@
1
+ 3.15.0
@@ -16,6 +16,12 @@ class BaseError(Exception):
16
16
  library. It provides common functionality for error handling, message
17
17
  formatting, and error identification.
18
18
 
19
+ ``BaseError`` is not exported from the top-level ``fiddler`` package;
20
+ import it from ``fiddler.exceptions``. The client also raises a plain
21
+ ``BaseError`` when it gives up retrying a request (timeouts, connection
22
+ failures, HTTP 429, and most 5xx responses); the message says how many
23
+ attempts were made.
24
+
19
25
  Attributes:
20
26
  message: Human-readable error message describing the issue
21
27
  name: Name of the specific error type (class name)
@@ -23,11 +29,14 @@ class BaseError(Exception):
23
29
  Examples:
24
30
  Catching any Fiddler-specific error:
25
31
 
26
- try:
27
- # Some Fiddler operation
28
- pass
29
- except BaseError as e:
30
- print(f"Fiddler error occurred: {e.name} - {e.message}")
32
+ .. code-block:: python
33
+
34
+ from fiddler.exceptions import BaseError
35
+
36
+ try:
37
+ project = fdl.Project.from_name(name="my-project")
38
+ except BaseError as e:
39
+ print(f"Fiddler error occurred: {e.name} - {e.message}")
31
40
  """
32
41
  message: str = 'Something went wrong'
33
42
 
@@ -55,7 +64,9 @@ class IncompatibleClient(BaseError): # noqa: N818
55
64
  behavior or missing functionality.
56
65
 
57
66
  The exception includes both the client version and server version in the error
58
- message to help users understand what versions are involved in the incompatibility.
67
+ message to help users understand what versions are involved in the incompatibility,
68
+ for example: *Python Client version (3.8.0) is not compatible with your
69
+ Fiddler Platform version (3.5.0).*
59
70
 
60
71
  Attributes:
61
72
  message: Formatted message showing both client and server versions
@@ -63,15 +74,13 @@ class IncompatibleClient(BaseError): # noqa: N818
63
74
  Examples:
64
75
  Handling version incompatibility:
65
76
 
66
- try:
67
- fdl.init(url="https://old-fiddler.com", token="token")
68
- except IncompatibleClient as e:
69
- print(f"Version mismatch: {e.message}")
70
- # Upgrade client or contact administrator
77
+ .. code-block:: python
71
78
 
72
- Typical error message format:
73
- "Python Client version (3.8.0) is not compatible with your
74
- Fiddler Platform version (3.5.0)."
79
+ try:
80
+ fdl.init(url="https://old-fiddler.example.com", token="token")
81
+ except fdl.IncompatibleClient as e:
82
+ print(f"Version mismatch: {e.message}")
83
+ # Upgrade the client or contact your administrator
75
84
  """
76
85
 
77
86
  message = (
@@ -102,52 +111,42 @@ class AsyncJobFailed(BaseError): # noqa: N818
102
111
  Examples:
103
112
  Handling async job failures:
104
113
 
105
- try:
106
- job = model.upload_artifact(artifact_path)
107
- job.wait() # Wait for completion
108
- except AsyncJobFailed as e:
109
- print(f"Job failed: {e.message}")
110
- # Check job logs or retry operation
111
-
112
- Monitoring job status to avoid exceptions:
113
-
114
- job = model.upload_artifact(artifact_path)
115
- while not job.is_complete():
116
- if job.status == JobStatus.FAILED:
117
- print(f"Job failed: {job.error_message}")
118
- break
119
- time.sleep(5)
114
+ .. code-block:: python
115
+
116
+ job = model.add_artifact(model_dir="model_package/")
117
+ try:
118
+ job.wait() # Raises AsyncJobFailed if the job fails
119
+ except fdl.AsyncJobFailed as e:
120
+ print(f"Job failed: {e.message}")
121
+ # Check the job details or retry the operation
120
122
  """
121
123
 
122
124
 
123
125
  class Unsupported(BaseError): # noqa: N818
124
126
  """Raised when an unsupported operation is attempted.
125
127
 
126
- This exception occurs when users try to perform operations that are not
127
- supported by the current Fiddler platform configuration, client version,
128
- or specific model/dataset setup. This can include feature limitations,
129
- deprecated functionality, or operations not available for certain model types.
128
+ This exception occurs when you call a client method that has been retired,
129
+ or when the Fiddler platform rejects a request with HTTP 405
130
+ (Method Not Allowed).
131
+
132
+ Common unsupported scenarios:
130
133
 
131
- Common scenarios include attempting to use features not available in the
132
- current platform edition, trying deprecated API methods, or performing
133
- operations incompatible with the model's configuration.
134
+ - Calling a method retired in an earlier client version
135
+ - An operation the platform rejects with HTTP 405 (Method Not Allowed)
134
136
 
135
137
  Attributes:
136
138
  message: Description of the unsupported operation
137
139
 
138
140
  Examples:
139
- Handling unsupported operations:
140
-
141
- try:
142
- model.enable_advanced_feature()
143
- except Unsupported as e:
144
- print(f"Feature not available: {e.message}")
145
- # Use alternative approach or upgrade platform
146
-
147
- Common unsupported scenarios:
148
- - Using enterprise features on basic plans
149
- - Attempting operations on incompatible model types
150
- - Calling deprecated API methods
141
+ Handling a method that is no longer supported:
142
+
143
+ .. code-block:: python
144
+
145
+ try:
146
+ df = model.get_slice(query="SELECT * FROM my_table")
147
+ except fdl.Unsupported as e:
148
+ print(f"Not supported: {e.message}")
149
+ # The message names the replacement, e.g. model.download_data
151
150
  """
152
151
 
153
152
  message = 'This operation is not supported'
@@ -156,23 +155,26 @@ class Unsupported(BaseError): # noqa: N818
156
155
  class HttpError(BaseError):
157
156
  """Base class for all HTTP-related errors.
158
157
 
159
- This is the parent class for HTTP communication errors that can occur
160
- during API requests to the Fiddler platform. While this specific class
161
- is deprecated and no longer thrown directly, it serves as the base for
162
- more specific HTTP error types.
158
+ This is the parent class of :class:`ApiError` (and so of
159
+ :class:`NotFound` and :class:`Conflict`). It is also raised directly when
160
+ an API response body is not valid JSON (message starting
161
+ ``Invalid JSON response``).
163
162
 
164
163
  Note:
165
- This class is deprecated and not thrown anymore. Use more specific
166
- HTTP error subclasses like ApiError, NotFound, or Conflict instead.
164
+ Catching ``HttpError`` does not catch every failed request: HTTP 405
165
+ is raised as :class:`Unsupported`, an error response without a
166
+ structured body is re-raised as ``requests.HTTPError``, and a request
167
+ the client gave up retrying ends in a plain ``BaseError``.
167
168
 
168
169
  Examples:
169
- Catching any HTTP-related error:
170
+ Catching Fiddler API errors and invalid JSON responses:
171
+
172
+ .. code-block:: python
170
173
 
171
- try:
172
- # API operation
173
- pass
174
- except HttpError as e:
175
- print(f"HTTP error: {e.message}")
174
+ try:
175
+ project = fdl.Project.from_name(name="my-project")
176
+ except fdl.HttpError as e:
177
+ print(f"HTTP error: {e.message}")
176
178
  """
177
179
 
178
180
 
@@ -185,22 +187,25 @@ class ConnTimeout(HttpError): # noqa: N818
185
187
  configured timeout period.
186
188
 
187
189
  Note:
188
- This class is deprecated and not thrown anymore. The client now
189
- handles timeouts through the underlying HTTP client with automatic
190
- retry mechanisms.
190
+ This class is deprecated and not thrown anymore, so
191
+ ``except fdl.ConnTimeout`` never fires. A timed-out request is retried,
192
+ and when the client gives up it raises a plain ``BaseError``; catch
193
+ that instead, and raise the timeout in ``fdl.init()`` if needed.
191
194
 
192
195
  Attributes:
193
196
  message: Timeout-specific error message
194
197
 
195
198
  Examples:
196
- Historical usage (now deprecated):
197
-
198
- try:
199
- # Long-running API call
200
- pass
201
- except ConnTimeout as e:
202
- print(f"Request timed out: {e.message}")
203
- # Retry with longer timeout or check network
199
+ Catching a request that failed after retries:
200
+
201
+ .. code-block:: python
202
+
203
+ from fiddler.exceptions import BaseError
204
+
205
+ try:
206
+ project = fdl.Project.from_name(name="my-project")
207
+ except BaseError as e:
208
+ print(f"Request failed after retries: {e.message}")
204
209
  """
205
210
 
206
211
  message = 'Request timed out while trying to reach endpoint'
@@ -214,22 +219,25 @@ class ConnError(HttpError):
214
219
  unreachability, DNS resolution failures, or connection refused errors.
215
220
 
216
221
  Note:
217
- This class is deprecated and not thrown anymore. The client now
218
- handles connection errors through the underlying HTTP client with
219
- automatic retry mechanisms and more specific error reporting.
222
+ This class is deprecated and not thrown anymore, so
223
+ ``except fdl.ConnError`` never fires. A failed connection (for example
224
+ a DNS error or a refused connection) is retried, and when the client
225
+ gives up it raises a plain ``BaseError``; catch that instead.
220
226
 
221
227
  Attributes:
222
228
  message: Connection-specific error message
223
229
 
224
230
  Examples:
225
- Historical usage (now deprecated):
226
-
227
- try:
228
- # Network API call
229
- pass
230
- except ConnError as e:
231
- print(f"Connection failed: {e.message}")
232
- # Check network connectivity or URL configuration
231
+ Catching a request that failed after retries:
232
+
233
+ .. code-block:: python
234
+
235
+ from fiddler.exceptions import BaseError
236
+
237
+ try:
238
+ project = fdl.Project.from_name(name="my-project")
239
+ except BaseError as e:
240
+ print(f"Request failed after retries: {e.message}")
233
241
  """
234
242
 
235
243
  message = 'Unable to reach the given endpoint'
@@ -248,6 +256,9 @@ class ApiError(HttpError):
248
256
  NotFound and Conflict, but can also be raised directly for other
249
257
  HTTP error status codes.
250
258
 
259
+ You won't see HTTP 429 or most 5xx codes here: the client retries those
260
+ itself and, when it gives up, raises a plain ``BaseError`` instead.
261
+
251
262
  Attributes:
252
263
  code: HTTP status code returned by the API
253
264
  message: Error message from the API response
@@ -257,26 +268,26 @@ class ApiError(HttpError):
257
268
  Examples:
258
269
  Handling general API errors:
259
270
 
260
- try:
261
- model = client.get_model("nonexistent-model")
262
- except ApiError as e:
263
- print(f"API Error {e.code}: {e.message}")
264
- if e.errors:
265
- print(f"Details: {e.errors}")
271
+ .. code-block:: python
272
+
273
+ try:
274
+ model = fdl.Model.from_name(name="my-model", project_id=project.id)
275
+ except fdl.ApiError as e:
276
+ print(f"API Error {e.code}: {e.message}")
277
+ if e.errors:
278
+ print(f"Details: {e.errors}")
266
279
 
267
280
  Handling specific status codes:
268
281
 
269
- try:
270
- # API operation
271
- pass
272
- except ApiError as e:
273
- if e.code == 429: # Rate limit
274
- print("Rate limited, retrying later...")
275
- time.sleep(60)
276
- elif e.code >= 500: # Server error
277
- print("Server error, contact support")
278
- else:
279
- print(f"Client error: {e.message}")
282
+ .. code-block:: python
283
+
284
+ try:
285
+ model = fdl.Model.from_name(name="my-model", project_id=project.id)
286
+ except fdl.ApiError as e:
287
+ if e.code in (401, 403):
288
+ print("Check your token and its permissions")
289
+ else:
290
+ print(f"API error {e.code}: {e.message}")
280
291
  """
281
292
 
282
293
  code: int = HTTPStatus.INTERNAL_SERVER_ERROR
@@ -299,8 +310,11 @@ class NotFound(ApiError): # noqa: N818
299
310
  projects, datasets, alerts, or any other entity that cannot be located
300
311
  using the provided identifier.
301
312
 
302
- Common scenarios include using incorrect IDs, attempting to access deleted
303
- resources, or referencing resources that haven't been created yet.
313
+ Common NotFound scenarios:
314
+
315
+ - Accessing models, projects, or datasets with wrong IDs
316
+ - Referencing deleted or expired resources
317
+ - Typos in resource names or identifiers
304
318
 
305
319
  Attributes:
306
320
  code: Always set to 404 (HTTP_NOT_FOUND)
@@ -310,25 +324,26 @@ class NotFound(ApiError): # noqa: N818
310
324
  Examples:
311
325
  Handling missing resources:
312
326
 
313
- try:
314
- model = client.get_model("wrong-model-id")
315
- except NotFound as e:
316
- print(f"Model not found: {e.message}")
317
- # Create the model or check the correct ID
327
+ .. code-block:: python
328
+
329
+ try:
330
+ model = fdl.Model.from_name(name="wrong-model-name", project_id=project.id)
331
+ except fdl.NotFound as e:
332
+ print(f"Model not found: {e.message}")
333
+ # Create the model or check the name
318
334
 
319
335
  Checking if a resource exists:
320
336
 
321
- try:
322
- project = client.get_project("my-project")
323
- print("Project exists")
324
- except NotFound:
325
- print("Project doesn't exist, creating it...")
326
- project = client.create_project(name="my-project")
327
-
328
- Common NotFound scenarios:
329
- - Accessing models, projects, or datasets with wrong IDs
330
- - Referencing deleted or expired resources
331
- - Typos in resource names or identifiers
337
+ .. code-block:: python
338
+
339
+ try:
340
+ project = fdl.Project.from_name(name="my-project")
341
+ print("Project exists")
342
+ except fdl.NotFound:
343
+ print("Project doesn't exist, creating it...")
344
+ project = fdl.Project(name="my-project").create()
345
+
346
+ # fdl.Project.get_or_create(name="my-project") does both in one call
332
347
  """
333
348
  code: int = HTTPStatus.NOT_FOUND
334
349
  """HTTP status code; always ``404`` (``HTTPStatus.NOT_FOUND``)."""
@@ -344,9 +359,12 @@ class Conflict(ApiError): # noqa: N818
344
359
  create resources that already exist, or when concurrent modifications cause
345
360
  state conflicts.
346
361
 
347
- Common scenarios include creating models or projects with names that already
348
- exist, attempting to modify resources that are currently being processed,
349
- or violating business rules that prevent certain operations.
362
+ Common Conflict scenarios:
363
+
364
+ - Creating resources with duplicate names
365
+ - Modifying resources during processing
366
+ - Violating business logic constraints
367
+ - Concurrent modification conflicts
350
368
 
351
369
  Attributes:
352
370
  code: Always set to 409 (HTTP_CONFLICT)
@@ -356,26 +374,14 @@ class Conflict(ApiError): # noqa: N818
356
374
  Examples:
357
375
  Handling resource conflicts:
358
376
 
359
- try:
360
- project = client.create_project(name="existing-project")
361
- except Conflict as e:
362
- print(f"Project already exists: {e.message}")
363
- # Use existing project or choose different name
364
- project = client.get_project("existing-project")
365
-
366
- Handling state conflicts:
367
-
368
- try:
369
- model.update_status("active")
370
- except Conflict as e:
371
- print(f"Cannot change status: {e.message}")
372
- # Wait for current operation to complete
373
-
374
- Common Conflict scenarios:
375
- - Creating resources with duplicate names
376
- - Modifying resources during processing
377
- - Violating business logic constraints
378
- - Concurrent modification conflicts
377
+ .. code-block:: python
378
+
379
+ try:
380
+ project = fdl.Project(name="existing-project").create()
381
+ except fdl.Conflict as e:
382
+ print(f"Project already exists: {e.message}")
383
+ # Use the existing project or choose a different name
384
+ project = fdl.Project.from_name(name="existing-project")
379
385
  """
380
386
  code: int = HTTPStatus.CONFLICT
381
387
  """HTTP status code; always ``409`` (``HTTPStatus.CONFLICT``)."""
@@ -1,18 +1,17 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fiddler-client
3
- Version: 3.14.1
3
+ Version: 3.15.0
4
4
  Summary: Python client for Fiddler Platform
5
5
  Author: Fiddler Labs
6
6
  License-Expression: Apache-2.0
7
7
  Project-URL: Homepage, https://fiddler.ai
8
8
  Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.10
10
9
  Classifier: Programming Language :: Python :: 3.11
11
10
  Classifier: Programming Language :: Python :: 3.12
12
11
  Classifier: Programming Language :: Python :: 3.13
13
12
  Classifier: Programming Language :: Python :: 3.14
14
13
  Classifier: Operating System :: OS Independent
15
- Requires-Python: >=3.10
14
+ Requires-Python: >=3.11
16
15
  Description-Content-Type: text/markdown
17
16
  License-File: LICENSE.txt
18
17
  Requires-Dist: requests<3
@@ -58,7 +57,7 @@ pip install fiddler-client
58
57
 
59
58
  ## Requirements
60
59
 
61
- - Python 3.10 or higher
60
+ - Python 3.11 or higher
62
61
  - pip 19.0 or higher (latest release preferred)
63
62
 
64
63
  ## Quick Start
@@ -12,14 +12,13 @@ authors = [
12
12
  license = "Apache-2.0"
13
13
  classifiers = [
14
14
  "Programming Language :: Python :: 3",
15
- "Programming Language :: Python :: 3.10",
16
15
  "Programming Language :: Python :: 3.11",
17
16
  "Programming Language :: Python :: 3.12",
18
17
  "Programming Language :: Python :: 3.13",
19
18
  "Programming Language :: Python :: 3.14",
20
19
  "Operating System :: OS Independent",
21
20
  ]
22
- requires-python = ">=3.10"
21
+ requires-python = ">=3.11"
23
22
  dependencies = [
24
23
  "requests<3",
25
24
  "requests-toolbelt",
@@ -49,13 +48,13 @@ fiddler = ["VERSION"]
49
48
  [dependency-groups]
50
49
  dev = [
51
50
  "deepdiff==9.1.0",
52
- "flake8==7.3.0",
53
- "flake8-bugbear==25.11.29",
51
+ "flake8==7.4.1",
52
+ "flake8-bugbear==26.9.30",
54
53
  "flake8-builtins==3.1.0",
55
54
  "flake8-eradicate==1.5.0",
56
- "mypy==1.19.1",
55
+ "mypy==2.3.0",
57
56
  "mypy-extensions==1.1.0",
58
- "pylint==4.0.8",
57
+ "pylint==4.1.1",
59
58
  "pylint-pydantic==0.4.1",
60
59
  "pytest==9.1.1",
61
60
  "pytest-cov==7.1.0",
@@ -63,7 +62,7 @@ dev = [
63
62
  "python-decouple==3.8",
64
63
  "responses==0.26.3",
65
64
  "types-PyYAML",
66
- "types-requests==2.33.0.20260712",
65
+ "types-requests==2.33.0.20260906",
67
66
  "types-simplejson==4.1.0.20260724",
68
67
  "ruff",
69
68
  "twine",
@@ -1 +0,0 @@
1
- 3.14.1