simplex 1.2.16__tar.gz → 1.2.18__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 simplex might be problematic. Click here for more details.
- {simplex-1.2.16 → simplex-1.2.18}/PKG-INFO +5 -17
- {simplex-1.2.16 → simplex-1.2.18}/setup.py +5 -17
- {simplex-1.2.16 → simplex-1.2.18}/simplex/simplex.py +60 -19
- {simplex-1.2.16 → simplex-1.2.18}/simplex.egg-info/PKG-INFO +5 -17
- simplex-1.2.18/simplex.egg-info/requires.txt +4 -0
- simplex-1.2.16/simplex.egg-info/requires.txt +0 -16
- {simplex-1.2.16 → simplex-1.2.18}/LICENSE +0 -0
- {simplex-1.2.16 → simplex-1.2.18}/README.md +0 -0
- {simplex-1.2.16 → simplex-1.2.18}/pyproject.toml +0 -0
- {simplex-1.2.16 → simplex-1.2.18}/setup.cfg +0 -0
- {simplex-1.2.16 → simplex-1.2.18}/simplex/__init__.py +0 -0
- {simplex-1.2.16 → simplex-1.2.18}/simplex/cli.py +0 -0
- {simplex-1.2.16 → simplex-1.2.18}/simplex/deploy/__init__.py +0 -0
- {simplex-1.2.16 → simplex-1.2.18}/simplex/deploy/push.py +0 -0
- {simplex-1.2.16 → simplex-1.2.18}/simplex.egg-info/SOURCES.txt +0 -0
- {simplex-1.2.16 → simplex-1.2.18}/simplex.egg-info/dependency_links.txt +0 -0
- {simplex-1.2.16 → simplex-1.2.18}/simplex.egg-info/entry_points.txt +0 -0
- {simplex-1.2.16 → simplex-1.2.18}/simplex.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: simplex
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.18
|
|
4
4
|
Summary: Official Python SDK for Simplex API
|
|
5
5
|
Home-page: https://simplex.sh
|
|
6
6
|
Author: Simplex Labs, Inc.
|
|
@@ -13,22 +13,10 @@ Classifier: Intended Audience :: Developers
|
|
|
13
13
|
Requires-Python: >=3.9
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
|
16
|
-
Requires-Dist:
|
|
17
|
-
Requires-Dist:
|
|
18
|
-
Requires-Dist:
|
|
19
|
-
Requires-Dist: click
|
|
20
|
-
Requires-Dist: rich>=13.0.0
|
|
21
|
-
Requires-Dist: prompt_toolkit>=3.0.0
|
|
22
|
-
Requires-Dist: playwright>=1.0.0
|
|
23
|
-
Requires-Dist: Pillow>=9.0.0
|
|
24
|
-
Requires-Dist: PyYAML>=6.0.1
|
|
25
|
-
Requires-Dist: boto3>=1.28.0
|
|
26
|
-
Requires-Dist: requests>=2.31.0
|
|
27
|
-
Requires-Dist: MainContentExtractor
|
|
28
|
-
Requires-Dist: langchain_core
|
|
29
|
-
Requires-Dist: langchain_community
|
|
30
|
-
Requires-Dist: langchain_openai
|
|
31
|
-
Requires-Dist: langchain_anthropic
|
|
16
|
+
Requires-Dist: colorama
|
|
17
|
+
Requires-Dist: requests
|
|
18
|
+
Requires-Dist: python-dotenv
|
|
19
|
+
Requires-Dist: click
|
|
32
20
|
Dynamic: author
|
|
33
21
|
Dynamic: author-email
|
|
34
22
|
Dynamic: classifier
|
|
@@ -2,28 +2,16 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="simplex",
|
|
5
|
-
version="1.2.
|
|
5
|
+
version="1.2.18",
|
|
6
6
|
packages=find_packages(),
|
|
7
7
|
package_data={
|
|
8
8
|
"simplex": ["browser_agent/dom/*.js"], # Include JS files in the dom directory
|
|
9
9
|
},
|
|
10
10
|
install_requires=[
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"click
|
|
15
|
-
"rich>=13.0.0",
|
|
16
|
-
"prompt_toolkit>=3.0.0",
|
|
17
|
-
"playwright>=1.0.0",
|
|
18
|
-
"Pillow>=9.0.0",
|
|
19
|
-
"PyYAML>=6.0.1",
|
|
20
|
-
"boto3>=1.28.0",
|
|
21
|
-
"requests>=2.31.0",
|
|
22
|
-
"MainContentExtractor",
|
|
23
|
-
"langchain_core",
|
|
24
|
-
"langchain_community",
|
|
25
|
-
"langchain_openai",
|
|
26
|
-
"langchain_anthropic"
|
|
11
|
+
"colorama",
|
|
12
|
+
"requests",
|
|
13
|
+
"python-dotenv",
|
|
14
|
+
"click",
|
|
27
15
|
],
|
|
28
16
|
entry_points={
|
|
29
17
|
'console_scripts': [
|
|
@@ -20,7 +20,10 @@ class Simplex:
|
|
|
20
20
|
data={'session_id': self.session_id}
|
|
21
21
|
)
|
|
22
22
|
self.session_id = None
|
|
23
|
-
|
|
23
|
+
if response["succeeded"]:
|
|
24
|
+
return
|
|
25
|
+
else:
|
|
26
|
+
raise ValueError(f"Failed to close session: {response['error']}")
|
|
24
27
|
|
|
25
28
|
def create_session(self, show_in_console: bool = True):
|
|
26
29
|
response = requests.post(
|
|
@@ -29,8 +32,9 @@ class Simplex:
|
|
|
29
32
|
'x-api-key': self.api_key
|
|
30
33
|
}
|
|
31
34
|
)
|
|
32
|
-
|
|
33
35
|
response_json = response.json()
|
|
36
|
+
if 'session_id' not in response_json:
|
|
37
|
+
raise ValueError(f"It looks like the session wasn't created successfully. Did you set your api_key when creating the Simplex class?")
|
|
34
38
|
self.session_id = response_json['session_id']
|
|
35
39
|
livestream_url = response_json['livestream_url']
|
|
36
40
|
|
|
@@ -60,7 +64,10 @@ class Simplex:
|
|
|
60
64
|
},
|
|
61
65
|
data=data
|
|
62
66
|
)
|
|
63
|
-
|
|
67
|
+
if response.json()["succeeded"]:
|
|
68
|
+
return
|
|
69
|
+
else:
|
|
70
|
+
raise ValueError(f"Failed to goto url: {response.json()['error']}")
|
|
64
71
|
|
|
65
72
|
def click(self, element_description: str, cdp_url: str = None, use_vision: bool = False):
|
|
66
73
|
if not cdp_url and not self.session_id:
|
|
@@ -83,7 +90,10 @@ class Simplex:
|
|
|
83
90
|
},
|
|
84
91
|
data=data
|
|
85
92
|
)
|
|
86
|
-
|
|
93
|
+
if response.json()["succeeded"]:
|
|
94
|
+
return response.json()["element_clicked"]
|
|
95
|
+
else:
|
|
96
|
+
raise ValueError(f"Failed to click element: {response.json()['error']}")
|
|
87
97
|
|
|
88
98
|
def type(self, text: str, cdp_url: str = None):
|
|
89
99
|
if not cdp_url and not self.session_id:
|
|
@@ -103,7 +113,10 @@ class Simplex:
|
|
|
103
113
|
},
|
|
104
114
|
data=data
|
|
105
115
|
)
|
|
106
|
-
|
|
116
|
+
if response.json()["succeeded"]:
|
|
117
|
+
return
|
|
118
|
+
else:
|
|
119
|
+
raise ValueError(f"Failed to type text: {response.json()['error']}")
|
|
107
120
|
|
|
108
121
|
def press_enter(self, cdp_url: str = None):
|
|
109
122
|
if not cdp_url and not self.session_id:
|
|
@@ -123,7 +136,10 @@ class Simplex:
|
|
|
123
136
|
},
|
|
124
137
|
data=data
|
|
125
138
|
)
|
|
126
|
-
|
|
139
|
+
if response.json()["succeeded"]:
|
|
140
|
+
return
|
|
141
|
+
else:
|
|
142
|
+
raise ValueError(f"Failed to press enter: {response.json()['error']}")
|
|
127
143
|
|
|
128
144
|
def extract_bbox(self, element_description: str, cdp_url: str = None):
|
|
129
145
|
if not cdp_url and not self.session_id:
|
|
@@ -143,8 +159,10 @@ class Simplex:
|
|
|
143
159
|
},
|
|
144
160
|
params=data
|
|
145
161
|
)
|
|
146
|
-
|
|
147
|
-
|
|
162
|
+
if response.json()["succeeded"]:
|
|
163
|
+
return response.json()["bbox"]
|
|
164
|
+
else:
|
|
165
|
+
raise ValueError(f"Failed to extract bbox: {response.json()['error']}")
|
|
148
166
|
|
|
149
167
|
def extract_text(self, element_description: str, cdp_url: str = None, use_vision: bool = False):
|
|
150
168
|
if not cdp_url and not self.session_id:
|
|
@@ -167,7 +185,10 @@ class Simplex:
|
|
|
167
185
|
},
|
|
168
186
|
params=data
|
|
169
187
|
)
|
|
170
|
-
|
|
188
|
+
if response.json()["succeeded"]:
|
|
189
|
+
return response.json()["text"]
|
|
190
|
+
else:
|
|
191
|
+
raise ValueError(f"Failed to extract text: {response.json()['error']}")
|
|
171
192
|
|
|
172
193
|
def extract_image(self, element_description: str, cdp_url: str = None):
|
|
173
194
|
if not cdp_url and not self.session_id:
|
|
@@ -187,7 +208,10 @@ class Simplex:
|
|
|
187
208
|
},
|
|
188
209
|
params=data
|
|
189
210
|
)
|
|
190
|
-
|
|
211
|
+
if response.json()["succeeded"]:
|
|
212
|
+
return response.json()["image"]
|
|
213
|
+
else:
|
|
214
|
+
raise ValueError(f"Failed to extract image: {response.json()['error']}")
|
|
191
215
|
|
|
192
216
|
def scroll(self, pixels: float, cdp_url: str = None):
|
|
193
217
|
if not cdp_url and not self.session_id:
|
|
@@ -207,7 +231,10 @@ class Simplex:
|
|
|
207
231
|
},
|
|
208
232
|
data=data
|
|
209
233
|
)
|
|
210
|
-
|
|
234
|
+
if response.json()["succeeded"]:
|
|
235
|
+
return
|
|
236
|
+
else:
|
|
237
|
+
raise ValueError(f"Failed to scroll: {response.json()['error']}")
|
|
211
238
|
|
|
212
239
|
def wait(self, milliseconds: int, cdp_url: str = None):
|
|
213
240
|
if not cdp_url and not self.session_id:
|
|
@@ -227,7 +254,10 @@ class Simplex:
|
|
|
227
254
|
},
|
|
228
255
|
data=data
|
|
229
256
|
)
|
|
230
|
-
|
|
257
|
+
if response.json()["succeeded"]:
|
|
258
|
+
return
|
|
259
|
+
else:
|
|
260
|
+
raise ValueError(f"Failed to wait: {response.json()['error']}")
|
|
231
261
|
|
|
232
262
|
def create_login_session(self, url: str):
|
|
233
263
|
response = requests.post(
|
|
@@ -237,7 +267,10 @@ class Simplex:
|
|
|
237
267
|
},
|
|
238
268
|
data={'url': url}
|
|
239
269
|
)
|
|
240
|
-
|
|
270
|
+
if response.json()["succeeded"]:
|
|
271
|
+
return response.json()["login_session_url"]
|
|
272
|
+
else:
|
|
273
|
+
raise ValueError(f"Failed to create login session: {response.json()['error']}")
|
|
241
274
|
|
|
242
275
|
def restore_login_session(self, session_data_filepath: str, cdp_url: str = None):
|
|
243
276
|
filename = session_data_filepath
|
|
@@ -261,7 +294,10 @@ class Simplex:
|
|
|
261
294
|
},
|
|
262
295
|
data=data
|
|
263
296
|
)
|
|
264
|
-
|
|
297
|
+
if response.json()["succeeded"]:
|
|
298
|
+
return
|
|
299
|
+
else:
|
|
300
|
+
raise ValueError(f"Failed to restore login session: {response.json()['error']}")
|
|
265
301
|
|
|
266
302
|
def click_and_upload(self, element_description: str, file_path: str):
|
|
267
303
|
if not self.session_id:
|
|
@@ -285,7 +321,10 @@ class Simplex:
|
|
|
285
321
|
files=files,
|
|
286
322
|
data=data
|
|
287
323
|
)
|
|
288
|
-
|
|
324
|
+
if response.json()["succeeded"]:
|
|
325
|
+
return
|
|
326
|
+
else:
|
|
327
|
+
raise ValueError(f"Failed to click and upload: {response.json()['error']}")
|
|
289
328
|
|
|
290
329
|
def click_and_download(self, element_description: str):
|
|
291
330
|
if not self.session_id:
|
|
@@ -304,8 +343,10 @@ class Simplex:
|
|
|
304
343
|
},
|
|
305
344
|
data=data
|
|
306
345
|
)
|
|
307
|
-
|
|
308
|
-
|
|
346
|
+
if response.json()["succeeded"]:
|
|
347
|
+
return response.json()["b64"], response.json()["filename"]
|
|
348
|
+
else:
|
|
349
|
+
raise ValueError(f"Failed to click and download: {response.json()['error']}")
|
|
309
350
|
|
|
310
351
|
def exists(self, element_description: str, cdp_url: str = None):
|
|
311
352
|
if not cdp_url and not self.session_id:
|
|
@@ -327,6 +368,6 @@ class Simplex:
|
|
|
327
368
|
)
|
|
328
369
|
response_json = response.json()
|
|
329
370
|
if response_json['succeeded']:
|
|
330
|
-
return
|
|
371
|
+
return response_json['reasoning']
|
|
331
372
|
else:
|
|
332
|
-
|
|
373
|
+
raise ValueError(f"Failed to check if element exists: {response_json['error']}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: simplex
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.18
|
|
4
4
|
Summary: Official Python SDK for Simplex API
|
|
5
5
|
Home-page: https://simplex.sh
|
|
6
6
|
Author: Simplex Labs, Inc.
|
|
@@ -13,22 +13,10 @@ Classifier: Intended Audience :: Developers
|
|
|
13
13
|
Requires-Python: >=3.9
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
|
16
|
-
Requires-Dist:
|
|
17
|
-
Requires-Dist:
|
|
18
|
-
Requires-Dist:
|
|
19
|
-
Requires-Dist: click
|
|
20
|
-
Requires-Dist: rich>=13.0.0
|
|
21
|
-
Requires-Dist: prompt_toolkit>=3.0.0
|
|
22
|
-
Requires-Dist: playwright>=1.0.0
|
|
23
|
-
Requires-Dist: Pillow>=9.0.0
|
|
24
|
-
Requires-Dist: PyYAML>=6.0.1
|
|
25
|
-
Requires-Dist: boto3>=1.28.0
|
|
26
|
-
Requires-Dist: requests>=2.31.0
|
|
27
|
-
Requires-Dist: MainContentExtractor
|
|
28
|
-
Requires-Dist: langchain_core
|
|
29
|
-
Requires-Dist: langchain_community
|
|
30
|
-
Requires-Dist: langchain_openai
|
|
31
|
-
Requires-Dist: langchain_anthropic
|
|
16
|
+
Requires-Dist: colorama
|
|
17
|
+
Requires-Dist: requests
|
|
18
|
+
Requires-Dist: python-dotenv
|
|
19
|
+
Requires-Dist: click
|
|
32
20
|
Dynamic: author
|
|
33
21
|
Dynamic: author-email
|
|
34
22
|
Dynamic: classifier
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
openai>=1.0.0
|
|
2
|
-
python-dotenv>=0.19.0
|
|
3
|
-
tiktoken>=0.5.0
|
|
4
|
-
click>=8.0.0
|
|
5
|
-
rich>=13.0.0
|
|
6
|
-
prompt_toolkit>=3.0.0
|
|
7
|
-
playwright>=1.0.0
|
|
8
|
-
Pillow>=9.0.0
|
|
9
|
-
PyYAML>=6.0.1
|
|
10
|
-
boto3>=1.28.0
|
|
11
|
-
requests>=2.31.0
|
|
12
|
-
MainContentExtractor
|
|
13
|
-
langchain_core
|
|
14
|
-
langchain_community
|
|
15
|
-
langchain_openai
|
|
16
|
-
langchain_anthropic
|
|
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
|
|
File without changes
|