simplex 1.2.46__tar.gz → 1.2.50__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.46 → simplex-1.2.50}/PKG-INFO +5 -9
- simplex-1.2.50/pyproject.toml +32 -0
- {simplex-1.2.46 → simplex-1.2.50}/setup.py +11 -4
- {simplex-1.2.46 → simplex-1.2.50}/simplex/simplex.py +28 -7
- {simplex-1.2.46 → simplex-1.2.50}/simplex.egg-info/PKG-INFO +5 -9
- {simplex-1.2.46 → simplex-1.2.50}/simplex.egg-info/SOURCES.txt +0 -1
- {simplex-1.2.46 → simplex-1.2.50}/simplex.egg-info/requires.txt +3 -1
- simplex-1.2.46/pyproject.toml +0 -3
- simplex-1.2.46/simplex.egg-info/entry_points.txt +0 -2
- {simplex-1.2.46 → simplex-1.2.50}/LICENSE +0 -0
- {simplex-1.2.46 → simplex-1.2.50}/README.md +0 -0
- {simplex-1.2.46 → simplex-1.2.50}/setup.cfg +0 -0
- {simplex-1.2.46 → simplex-1.2.50}/simplex/__init__.py +0 -0
- {simplex-1.2.46 → simplex-1.2.50}/simplex/cli.py +0 -0
- {simplex-1.2.46 → simplex-1.2.50}/simplex/deploy/__init__.py +0 -0
- {simplex-1.2.46 → simplex-1.2.50}/simplex/deploy/push.py +0 -0
- {simplex-1.2.46 → simplex-1.2.50}/simplex.egg-info/dependency_links.txt +0 -0
- {simplex-1.2.46 → simplex-1.2.50}/simplex.egg-info/top_level.txt +0 -0
- {simplex-1.2.46 → simplex-1.2.50}/tests/test.py +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: simplex
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.50
|
|
4
4
|
Summary: Official Python SDK for Simplex API
|
|
5
5
|
Home-page: https://simplex.sh
|
|
6
6
|
Author: Simplex Labs, Inc.
|
|
7
|
-
Author-email: founders@simplex.sh
|
|
7
|
+
Author-email: "Simplex Labs, Inc." <founders@simplex.sh>
|
|
8
|
+
Project-URL: Homepage, https://simplex.sh
|
|
8
9
|
Classifier: Programming Language :: Python :: 3
|
|
9
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
11
|
Classifier: Operating System :: OS Independent
|
|
@@ -17,16 +18,11 @@ Requires-Dist: colorama
|
|
|
17
18
|
Requires-Dist: requests
|
|
18
19
|
Requires-Dist: python-dotenv
|
|
19
20
|
Requires-Dist: click
|
|
20
|
-
|
|
21
|
+
Provides-Extra: playwright
|
|
22
|
+
Requires-Dist: playwright>=1.0.0; extra == "playwright"
|
|
21
23
|
Dynamic: author
|
|
22
|
-
Dynamic: author-email
|
|
23
|
-
Dynamic: classifier
|
|
24
|
-
Dynamic: description
|
|
25
|
-
Dynamic: description-content-type
|
|
26
24
|
Dynamic: home-page
|
|
27
|
-
Dynamic: requires-dist
|
|
28
25
|
Dynamic: requires-python
|
|
29
|
-
Dynamic: summary
|
|
30
26
|
|
|
31
27
|
# Simplex AI Python SDK
|
|
32
28
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=42", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "simplex"
|
|
7
|
+
version = "1.2.50"
|
|
8
|
+
description = "Official Python SDK for Simplex API"
|
|
9
|
+
authors = [
|
|
10
|
+
{name = "Simplex Labs, Inc.", email = "founders@simplex.sh"}
|
|
11
|
+
]
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.9"
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
"Development Status :: 4 - Beta",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"colorama",
|
|
23
|
+
"requests",
|
|
24
|
+
"python-dotenv",
|
|
25
|
+
"click",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.optional-dependencies]
|
|
29
|
+
playwright = ["playwright>=1.0.0"]
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
Homepage = "https://simplex.sh"
|
|
@@ -2,22 +2,27 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
from setuptools.command.develop import develop
|
|
3
3
|
from setuptools.command.install import install
|
|
4
4
|
from subprocess import check_call
|
|
5
|
+
import sys
|
|
5
6
|
|
|
6
7
|
class PostDevelopCommand(develop):
|
|
7
8
|
"""Post-installation for development mode."""
|
|
8
9
|
def run(self):
|
|
9
10
|
develop.run(self)
|
|
10
|
-
|
|
11
|
+
# Only install playwright if playwright version is being installed
|
|
12
|
+
if any('playwright' in arg for arg in sys.argv):
|
|
13
|
+
check_call(["playwright", "install"])
|
|
11
14
|
|
|
12
15
|
class PostInstallCommand(install):
|
|
13
16
|
"""Post-installation for installation mode."""
|
|
14
17
|
def run(self):
|
|
15
18
|
install.run(self)
|
|
16
|
-
|
|
19
|
+
# Only install playwright if playwright version is being installed
|
|
20
|
+
if any('playwright' in arg for arg in sys.argv):
|
|
21
|
+
check_call(["playwright", "install"])
|
|
17
22
|
|
|
18
23
|
setup(
|
|
19
24
|
name="simplex",
|
|
20
|
-
version="1.2.
|
|
25
|
+
version="1.2.51",
|
|
21
26
|
packages=find_packages(),
|
|
22
27
|
package_data={
|
|
23
28
|
"simplex": ["browser_agent/dom/*.js"], # Include JS files in the dom directory
|
|
@@ -27,8 +32,10 @@ setup(
|
|
|
27
32
|
"requests",
|
|
28
33
|
"python-dotenv",
|
|
29
34
|
"click",
|
|
30
|
-
"playwright",
|
|
31
35
|
],
|
|
36
|
+
extras_require={
|
|
37
|
+
'playwright': ['playwright>=1.0.0'], # Full version with playwright
|
|
38
|
+
},
|
|
32
39
|
cmdclass={
|
|
33
40
|
'develop': PostDevelopCommand,
|
|
34
41
|
'install': PostInstallCommand,
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import requests
|
|
2
2
|
import atexit
|
|
3
3
|
from typing import Optional
|
|
4
|
-
from playwright.sync_api import sync_playwright
|
|
5
4
|
import os
|
|
6
5
|
import json
|
|
6
|
+
import warnings
|
|
7
|
+
|
|
8
|
+
# Try to import playwright, but don't fail if it's not available (lite version)
|
|
9
|
+
try:
|
|
10
|
+
from playwright.sync_api import sync_playwright
|
|
11
|
+
PLAYWRIGHT_AVAILABLE = True
|
|
12
|
+
except ImportError:
|
|
13
|
+
PLAYWRIGHT_AVAILABLE = False
|
|
14
|
+
warnings.warn(
|
|
15
|
+
"Playwright is not available. Some features will be disabled. "
|
|
16
|
+
"To enable all features, install with 'pip install simplex[playwright]'",
|
|
17
|
+
ImportWarning
|
|
18
|
+
)
|
|
7
19
|
|
|
8
20
|
BASE_URL = "https://api.simplex.sh"
|
|
9
21
|
|
|
@@ -59,18 +71,23 @@ class Simplex:
|
|
|
59
71
|
self.api_key = api_key
|
|
60
72
|
self.session_id = None
|
|
61
73
|
atexit.register(self.close_session)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
74
|
+
if PLAYWRIGHT_AVAILABLE:
|
|
75
|
+
self.playwright = Playwright(self)
|
|
76
|
+
self.pw_browser = None
|
|
77
|
+
self.pw = None
|
|
78
|
+
else:
|
|
79
|
+
self.playwright = None
|
|
80
|
+
self.pw_browser = None
|
|
81
|
+
self.pw = None
|
|
65
82
|
|
|
66
83
|
def close_session(self):
|
|
67
|
-
if self.pw_browser:
|
|
84
|
+
if PLAYWRIGHT_AVAILABLE and self.pw_browser:
|
|
68
85
|
try:
|
|
69
86
|
self.pw_browser.close()
|
|
70
87
|
self.pw_browser = None
|
|
71
88
|
except Exception as e:
|
|
72
89
|
print(f"Failed to close pw_browser: {e}")
|
|
73
|
-
if self.pw:
|
|
90
|
+
if PLAYWRIGHT_AVAILABLE and self.pw:
|
|
74
91
|
try:
|
|
75
92
|
self.pw.stop()
|
|
76
93
|
self.pw = None
|
|
@@ -134,7 +151,8 @@ class Simplex:
|
|
|
134
151
|
livestream_url = response_json['livestream_url']
|
|
135
152
|
|
|
136
153
|
# Start Playwright without using context manager
|
|
137
|
-
|
|
154
|
+
if PLAYWRIGHT_AVAILABLE:
|
|
155
|
+
self.pw = sync_playwright().start()
|
|
138
156
|
self.connect_url = response_json['connect_url']
|
|
139
157
|
# self.pw_browser = self.pw.chromium.connect_over_cdp(response_json['connect_url'])
|
|
140
158
|
|
|
@@ -421,6 +439,9 @@ class Simplex:
|
|
|
421
439
|
raise ValueError(f"Failed to wait: {response.json()['error']}")
|
|
422
440
|
|
|
423
441
|
def create_login_session(self, url: str, save_directory: Optional[str] = None):
|
|
442
|
+
if not PLAYWRIGHT_AVAILABLE:
|
|
443
|
+
raise ImportError("This feature requires playwright. Install simplex[playwright] to use it.")
|
|
444
|
+
|
|
424
445
|
def get_website_name(url: str) -> str:
|
|
425
446
|
"""Extract website name from URL"""
|
|
426
447
|
from urllib.parse import urlparse
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: simplex
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.50
|
|
4
4
|
Summary: Official Python SDK for Simplex API
|
|
5
5
|
Home-page: https://simplex.sh
|
|
6
6
|
Author: Simplex Labs, Inc.
|
|
7
|
-
Author-email: founders@simplex.sh
|
|
7
|
+
Author-email: "Simplex Labs, Inc." <founders@simplex.sh>
|
|
8
|
+
Project-URL: Homepage, https://simplex.sh
|
|
8
9
|
Classifier: Programming Language :: Python :: 3
|
|
9
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
11
|
Classifier: Operating System :: OS Independent
|
|
@@ -17,16 +18,11 @@ Requires-Dist: colorama
|
|
|
17
18
|
Requires-Dist: requests
|
|
18
19
|
Requires-Dist: python-dotenv
|
|
19
20
|
Requires-Dist: click
|
|
20
|
-
|
|
21
|
+
Provides-Extra: playwright
|
|
22
|
+
Requires-Dist: playwright>=1.0.0; extra == "playwright"
|
|
21
23
|
Dynamic: author
|
|
22
|
-
Dynamic: author-email
|
|
23
|
-
Dynamic: classifier
|
|
24
|
-
Dynamic: description
|
|
25
|
-
Dynamic: description-content-type
|
|
26
24
|
Dynamic: home-page
|
|
27
|
-
Dynamic: requires-dist
|
|
28
25
|
Dynamic: requires-python
|
|
29
|
-
Dynamic: summary
|
|
30
26
|
|
|
31
27
|
# Simplex AI Python SDK
|
|
32
28
|
|
simplex-1.2.46/pyproject.toml
DELETED
|
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
|