inferencesh 0.1.14__py3-none-any.whl → 0.1.16__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.
inferencesh/sdk.py CHANGED
@@ -1,5 +1,5 @@
1
1
  from typing import Optional, Union, ClassVar
2
- from pydantic import BaseModel, ConfigDict
2
+ from pydantic import BaseModel, ConfigDict, PrivateAttr
3
3
  import mimetypes
4
4
  import os
5
5
  import urllib.request
@@ -108,8 +108,12 @@ class File(BaseModel):
108
108
  filename: Optional[str] = None # Original filename if available
109
109
  _tmp_path: Optional[str] = PrivateAttr(default=None) # Internal storage for temporary file path
110
110
 
111
- def __init__(self, **data):
112
- super().__init__(**data)
111
+ model_config = ConfigDict(
112
+ arbitrary_types_allowed=True,
113
+ populate_by_name=True
114
+ )
115
+
116
+ def model_post_init(self, _: Any) -> None:
113
117
  if self._is_url(self.uri):
114
118
  self._download_url()
115
119
  elif not os.path.isabs(self.uri):
@@ -203,8 +207,4 @@ class File(BaseModel):
203
207
 
204
208
  def refresh_metadata(self) -> None:
205
209
  """Refresh all metadata from the file."""
206
- self._populate_metadata()
207
-
208
- class Config:
209
- """Pydantic config"""
210
- arbitrary_types_allowed = True
210
+ self._populate_metadata()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: inferencesh
3
- Version: 0.1.14
3
+ Version: 0.1.16
4
4
  Summary: inference.sh Python SDK
5
5
  Author: Inference Shell Inc.
6
6
  Author-email: "Inference Shell Inc." <hello@inference.sh>
@@ -0,0 +1,8 @@
1
+ inferencesh/__init__.py,sha256=pR0MXSJe41LgJkjGK-jhZR7LjqCFdRZtNTV6qcjYSTI,123
2
+ inferencesh/sdk.py,sha256=UJ4qSOWjqH44rVLlu3lk3MVyw6pnj8DxwspsBTWm4Bw,7852
3
+ inferencesh-0.1.16.dist-info/LICENSE,sha256=OsgqEWIh2el_QMj0y8O1A5Q5Dl-dxqqYbFE6fszuR4s,1086
4
+ inferencesh-0.1.16.dist-info/METADATA,sha256=yEJt7lzzQQHR4eogFD2LsdeFmOVWrLYWJ6it9qUUvXA,2584
5
+ inferencesh-0.1.16.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
6
+ inferencesh-0.1.16.dist-info/entry_points.txt,sha256=6IC-fyozAqW3ljsMLGCXxJ0_ui2Jb-2fLHtoH1RTnEE,45
7
+ inferencesh-0.1.16.dist-info/top_level.txt,sha256=TSMHg3T1ThMl1HGAWmzBClwOYH1ump5neof9BfHIwaA,12
8
+ inferencesh-0.1.16.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- inferencesh/__init__.py,sha256=pR0MXSJe41LgJkjGK-jhZR7LjqCFdRZtNTV6qcjYSTI,123
2
- inferencesh/sdk.py,sha256=hfdaQs-ojHStDOqgBpNEXsqF8VmutbT-0mgQMm3PSVQ,7843
3
- inferencesh-0.1.14.dist-info/LICENSE,sha256=OsgqEWIh2el_QMj0y8O1A5Q5Dl-dxqqYbFE6fszuR4s,1086
4
- inferencesh-0.1.14.dist-info/METADATA,sha256=_e4fr2uefeABHk6hwnWnHDddL8QT-mFYrE7dRaIp9gA,2584
5
- inferencesh-0.1.14.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
6
- inferencesh-0.1.14.dist-info/entry_points.txt,sha256=6IC-fyozAqW3ljsMLGCXxJ0_ui2Jb-2fLHtoH1RTnEE,45
7
- inferencesh-0.1.14.dist-info/top_level.txt,sha256=TSMHg3T1ThMl1HGAWmzBClwOYH1ump5neof9BfHIwaA,12
8
- inferencesh-0.1.14.dist-info/RECORD,,