inferencesh 0.1.14__tar.gz → 0.1.16__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.
Potentially problematic release.
This version of inferencesh might be problematic. Click here for more details.
- {inferencesh-0.1.14/src/inferencesh.egg-info → inferencesh-0.1.16}/PKG-INFO +1 -1
- {inferencesh-0.1.14 → inferencesh-0.1.16}/pyproject.toml +1 -1
- {inferencesh-0.1.14 → inferencesh-0.1.16}/src/inferencesh/sdk.py +8 -8
- {inferencesh-0.1.14 → inferencesh-0.1.16/src/inferencesh.egg-info}/PKG-INFO +1 -1
- {inferencesh-0.1.14 → inferencesh-0.1.16}/LICENSE +0 -0
- {inferencesh-0.1.14 → inferencesh-0.1.16}/README.md +0 -0
- {inferencesh-0.1.14 → inferencesh-0.1.16}/setup.cfg +0 -0
- {inferencesh-0.1.14 → inferencesh-0.1.16}/setup.py +0 -0
- {inferencesh-0.1.14 → inferencesh-0.1.16}/src/inferencesh/__init__.py +0 -0
- {inferencesh-0.1.14 → inferencesh-0.1.16}/src/inferencesh.egg-info/SOURCES.txt +0 -0
- {inferencesh-0.1.14 → inferencesh-0.1.16}/src/inferencesh.egg-info/dependency_links.txt +0 -0
- {inferencesh-0.1.14 → inferencesh-0.1.16}/src/inferencesh.egg-info/entry_points.txt +0 -0
- {inferencesh-0.1.14 → inferencesh-0.1.16}/src/inferencesh.egg-info/requires.txt +0 -0
- {inferencesh-0.1.14 → inferencesh-0.1.16}/src/inferencesh.egg-info/top_level.txt +0 -0
- {inferencesh-0.1.14 → inferencesh-0.1.16}/tests/test_sdk.py +0 -0
|
@@ -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
|
-
|
|
112
|
-
|
|
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()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|