codemie-sdk-python 0.1.90__py3-none-any.whl → 0.1.92__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.

Potentially problematic release.


This version of codemie-sdk-python might be problematic. Click here for more details.

codemie_sdk/__init__.py CHANGED
@@ -19,5 +19,5 @@ Basic usage:
19
19
 
20
20
  from .client.client import CodeMieClient
21
21
 
22
- __version__ = "0.1.24"
22
+ __version__ = "0.1.25"
23
23
  __all__ = ["CodeMieClient"]
@@ -211,7 +211,7 @@ class AssistantService:
211
211
  (
212
212
  file_path.name,
213
213
  file,
214
- mimetypes.guess_type(file_path.name)
214
+ mimetypes.guess_type(file_path.name)[0]
215
215
  or "application/octet-stream",
216
216
  ),
217
217
  ),
@@ -1,6 +1,7 @@
1
1
  """DataSource service implementation."""
2
2
 
3
3
  import json
4
+ import mimetypes
4
5
  from typing import Literal, List, Union, Tuple, Optional, Dict, Any
5
6
  from pathlib import Path
6
7
 
@@ -82,7 +83,10 @@ class DatasourceService:
82
83
  content = f.read()
83
84
 
84
85
  # Basic MIME type detection
85
- mime_type = self._api.detect_mime_type(file_path)
86
+ mime_type = (
87
+ mimetypes.guess_type(file_path.name)[0]
88
+ or "application/octet-stream"
89
+ )
86
90
  file_uploads.append(("files", (file_path.name, content, mime_type)))
87
91
 
88
92
  elif isinstance(file_item, tuple) and len(file_item) == 3:
@@ -161,16 +165,20 @@ class DatasourceService:
161
165
  params["sort_key"] = sort_key
162
166
  params["sort_order"] = sort_order
163
167
 
168
+ unified_filters = {}
164
169
  if datasource_types:
165
- params["index_type"] = datasource_types
170
+ unified_filters["index_type"] = datasource_types
166
171
  if projects:
167
- params["project"] = projects
172
+ unified_filters["project"] = projects
168
173
  if status:
169
- params["status"] = status.value
174
+ unified_filters["status"] = status.value
170
175
  if owner:
171
- params["created_by"] = owner
176
+ unified_filters["created_by"] = owner
172
177
  if filters:
173
- params["filters"] = json.dumps(filters)
178
+ unified_filters.update(filters)
179
+ if unified_filters:
180
+ params["filters"] = json.dumps(unified_filters)
181
+
174
182
  return self._api.get("/v1/index", List[DataSource], params=params)
175
183
 
176
184
  def get(self, datasource_id: str) -> DataSource:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: codemie-sdk-python
3
- Version: 0.1.90
3
+ Version: 0.1.92
4
4
  Summary: CodeMie SDK for Python
5
5
  Author: Vadym Vlasenko
6
6
  Author-email: vadym_vlasenko@epam.com
@@ -1,4 +1,4 @@
1
- codemie_sdk/__init__.py,sha256=G9qZsljJ27VMX2-PS9L7q6PHR8imeP7zXHBu9DyVetc,567
1
+ codemie_sdk/__init__.py,sha256=leeACpTc2113BsY_IgO-ceFHPrQKC2WhuOfuuyyIqDE,567
2
2
  codemie_sdk/auth/__init__.py,sha256=IksEj223xEZtJ-cQ0AT9L0Bs9psIJ8QNzDXrPTUQ3xQ,126
3
3
  codemie_sdk/auth/credentials.py,sha256=u2eLNsD8fELTgreQghVb0g0kk82zchUkux0M5lzq-u8,4320
4
4
  codemie_sdk/client/__init__.py,sha256=yf6C39MmrJ6gK9ZHMhBeynKwUUYVSUTQbKxU8-4qpKg,101
@@ -14,8 +14,8 @@ codemie_sdk/models/task.py,sha256=J4ZFRY3s8qBGrqB5NLQF0rMbInLh4s7OEZ0ZfmnW0Ho,14
14
14
  codemie_sdk/models/user.py,sha256=Q0rjimZh-IbeaPfq6b6fk6ZaCtwLqWHEIlU863suCS4,1777
15
15
  codemie_sdk/models/workflow.py,sha256=pr8ap_70pzv3Ugvdo4RivNOFyoQVr1E5fze2O87L4gM,2431
16
16
  codemie_sdk/models/workflow_state.py,sha256=CMYFQZ7sy4QxmnWmc83TFfqP7TG_3rW5MdH5fxsS9kY,1251
17
- codemie_sdk/services/assistant.py,sha256=hd5_Bt6Cuf8_hOcnYIi6-S1z7PuCE3zXwf0U9UAMPlY,7885
18
- codemie_sdk/services/datasource.py,sha256=gIP9D-sq4733x9f0mWL87bMI1pWYxIsv5eYXkAs0O6Q,7150
17
+ codemie_sdk/services/assistant.py,sha256=BsTR_uoPoZtta6icfw2M0Ea6w2VIhYndDUVqsHJuZJo,7888
18
+ codemie_sdk/services/datasource.py,sha256=d8LImpireGOnXKvj4h8iafq_ZQMn177_GGLLiE5g7wU,7405
19
19
  codemie_sdk/services/integration.py,sha256=SdwFwR3hCPyJYilzzlkpKPLNbO89nfqmIXXoT7bDEBI,5410
20
20
  codemie_sdk/services/llm.py,sha256=0-e4_7RvLHs2giCyoQ5U4KDTh6p5VXgPKNxnDP9ZDFU,1100
21
21
  codemie_sdk/services/task.py,sha256=3e9t8_LMkR4xfeMBwMCo7ZF87PxPS-ZbzDg85ilda2M,1031
@@ -25,6 +25,6 @@ codemie_sdk/services/workflow_execution.py,sha256=aGoT3rdTmh5-doAsrmBBjLEuOfvL5a
25
25
  codemie_sdk/services/workflow_execution_state.py,sha256=tXoaa8yT09xgYEUNiHhVULe76TwGwVgZupMIUyyLxdo,2070
26
26
  codemie_sdk/utils/__init__.py,sha256=BXAJJfAzO89-kMYvWWo9wSNhSbGgF3vB1In9sePFhMM,109
27
27
  codemie_sdk/utils/http.py,sha256=FWU56W_-vBGbHfX1EC1zsoRjDoNCyNK2HCdNb4IkQVc,9233
28
- codemie_sdk_python-0.1.90.dist-info/METADATA,sha256=nQPmNJMB9RV_PLoh90xUwUFExoVwd1IqGGWID4K-oqY,23620
29
- codemie_sdk_python-0.1.90.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
30
- codemie_sdk_python-0.1.90.dist-info/RECORD,,
28
+ codemie_sdk_python-0.1.92.dist-info/METADATA,sha256=kFQlE6BZT8nNa0oG2UosBNS5omHzXqUYlOwbhY0uTDs,23620
29
+ codemie_sdk_python-0.1.92.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
30
+ codemie_sdk_python-0.1.92.dist-info/RECORD,,