inferencesh 0.1.8__py3-none-any.whl → 0.1.9__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 inferencesh might be problematic. Click here for more details.

inferencesh/sdk.py CHANGED
@@ -58,9 +58,16 @@ class File(BaseModel):
58
58
  tmp_file = tempfile.NamedTemporaryFile(delete=False, suffix=suffix)
59
59
  self._tmp_path = tmp_file.name
60
60
 
61
+ # Set up request with user agent
62
+ headers = {
63
+ 'User-Agent': 'inference.sh'
64
+ }
65
+ req = urllib.request.Request(original_url, headers=headers)
66
+
61
67
  # Download the file
62
68
  print(f"Downloading URL: {original_url} to {self._tmp_path}")
63
- urllib.request.urlretrieve(original_url, self._tmp_path)
69
+ with urllib.request.urlopen(req) as response, open(self._tmp_path, 'wb') as out_file:
70
+ out_file.write(response.read())
64
71
  self.path = self._tmp_path
65
72
 
66
73
  def __del__(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: inferencesh
3
- Version: 0.1.8
3
+ Version: 0.1.9
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=QOHT8As_SCGI93s6hd8i8tizOzSZ2bMneQCIc45IrXw,3959
3
+ inferencesh-0.1.9.dist-info/LICENSE,sha256=OsgqEWIh2el_QMj0y8O1A5Q5Dl-dxqqYbFE6fszuR4s,1086
4
+ inferencesh-0.1.9.dist-info/METADATA,sha256=n0_HTF7QFx9jhssc9EOJ5ByP74rWBLa7suS7Cbpn6Bc,2583
5
+ inferencesh-0.1.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
6
+ inferencesh-0.1.9.dist-info/entry_points.txt,sha256=6IC-fyozAqW3ljsMLGCXxJ0_ui2Jb-2fLHtoH1RTnEE,45
7
+ inferencesh-0.1.9.dist-info/top_level.txt,sha256=TSMHg3T1ThMl1HGAWmzBClwOYH1ump5neof9BfHIwaA,12
8
+ inferencesh-0.1.9.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- inferencesh/__init__.py,sha256=pR0MXSJe41LgJkjGK-jhZR7LjqCFdRZtNTV6qcjYSTI,123
2
- inferencesh/sdk.py,sha256=6g9gS0sDT8OOydHQ52ksoxiN1VIeGDt_JSwNICxzwlY,3697
3
- inferencesh-0.1.8.dist-info/LICENSE,sha256=OsgqEWIh2el_QMj0y8O1A5Q5Dl-dxqqYbFE6fszuR4s,1086
4
- inferencesh-0.1.8.dist-info/METADATA,sha256=22qGyQicpYlsPBG1MAL6q9wpn7JtuXIoNbBNi5xp3V0,2583
5
- inferencesh-0.1.8.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
6
- inferencesh-0.1.8.dist-info/entry_points.txt,sha256=6IC-fyozAqW3ljsMLGCXxJ0_ui2Jb-2fLHtoH1RTnEE,45
7
- inferencesh-0.1.8.dist-info/top_level.txt,sha256=TSMHg3T1ThMl1HGAWmzBClwOYH1ump5neof9BfHIwaA,12
8
- inferencesh-0.1.8.dist-info/RECORD,,