parsagon 0.14.28__tar.gz → 0.14.30__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.
Files changed (38) hide show
  1. {parsagon-0.14.28 → parsagon-0.14.30}/PKG-INFO +2 -1
  2. {parsagon-0.14.28 → parsagon-0.14.30}/pyproject.toml +2 -1
  3. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/api.py +8 -0
  4. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/executor.py +4 -0
  5. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon.egg-info/PKG-INFO +2 -1
  6. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon.egg-info/requires.txt +1 -0
  7. {parsagon-0.14.28 → parsagon-0.14.30}/README.md +0 -0
  8. {parsagon-0.14.28 → parsagon-0.14.30}/setup.cfg +0 -0
  9. {parsagon-0.14.28 → parsagon-0.14.30}/src/__init__.py +0 -0
  10. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/__init__.py +0 -0
  11. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/assistant.py +0 -0
  12. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/create.py +0 -0
  13. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/custom_function.py +0 -0
  14. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/edit.py +0 -0
  15. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/exceptions.py +0 -0
  16. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/gui/__init__.py +0 -0
  17. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/gui/controller.py +0 -0
  18. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/gui/menu.py +0 -0
  19. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/gui/window.py +0 -0
  20. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/gui_entry.py +0 -0
  21. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/highlights.js +0 -0
  22. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/main.py +0 -0
  23. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/print.py +0 -0
  24. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/runs.py +0 -0
  25. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/secrets.py +0 -0
  26. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/settings.py +0 -0
  27. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/tests/__init__.py +0 -0
  28. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/tests/api_mocks.py +0 -0
  29. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/tests/conftest.py +0 -0
  30. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/tests/test_executor.py +0 -0
  31. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/tests/test_invalid_args.py +0 -0
  32. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/tests/test_pipeline_operations.py +0 -0
  33. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/tests/test_print.py +0 -0
  34. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon/tests/test_secrets.py +0 -0
  35. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon.egg-info/SOURCES.txt +0 -0
  36. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon.egg-info/dependency_links.txt +0 -0
  37. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon.egg-info/entry_points.txt +0 -0
  38. {parsagon-0.14.28 → parsagon-0.14.30}/src/parsagon.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: parsagon
3
- Version: 0.14.28
3
+ Version: 0.14.30
4
4
  Summary: Allows you to create browser automations with natural language
5
5
  Author-email: Sandy Suh <sandy@parsagon.io>
6
6
  Project-URL: Homepage, https://parsagon.io
@@ -10,6 +10,7 @@ Requires-Python: >=3.8
10
10
  Description-Content-Type: text/markdown
11
11
  Requires-Dist: selenium==4.9.1
12
12
  Requires-Dist: lxml==4.9.2
13
+ Requires-Dist: cssselect==1.2.0
13
14
  Requires-Dist: httpx==0.27.0
14
15
  Requires-Dist: psutil==5.9.6
15
16
  Requires-Dist: rich==13.6.0
@@ -16,7 +16,7 @@ line-length = 120
16
16
 
17
17
  [project]
18
18
  name = "parsagon"
19
- version = "0.14.28"
19
+ version = "0.14.30"
20
20
  description = "Allows you to create browser automations with natural language"
21
21
  readme = "README.md"
22
22
  requires-python = ">=3.8"
@@ -31,6 +31,7 @@ classifiers = [
31
31
  dependencies = [
32
32
  'selenium == 4.9.1',
33
33
  'lxml == 4.9.2',
34
+ 'cssselect == 1.2.0',
34
35
  'httpx == 0.27.0',
35
36
  'psutil == 5.9.6',
36
37
  'rich == 13.6.0',
@@ -170,6 +170,14 @@ def get_json_about_data(data, question, model=None):
170
170
  return poll_about_data("/transformers/get-json-about-data/", {"data": data, "question": question, "model": model})
171
171
 
172
172
 
173
+ def get_serp_data(url):
174
+ """
175
+ Get Google results
176
+ :param url: the search url
177
+ """
178
+ return _api_call(httpx.post, "/transformers/get-serp-data/", json={"url": url})
179
+
180
+
173
181
  def create_pipeline(name, description, program_sketch, pseudocode, secrets):
174
182
  return _api_call(
175
183
  httpx.post,
@@ -9,6 +9,7 @@ import psutil
9
9
  import time
10
10
  from urllib.parse import urljoin
11
11
 
12
+ from lxml import etree
12
13
  import lxml.html
13
14
  from pypdf import PdfReader
14
15
  from pyvirtualdisplay import Display
@@ -32,6 +33,7 @@ from parsagon.api import (
32
33
  get_str_about_data,
33
34
  get_bool_about_data,
34
35
  get_json_about_data,
36
+ get_serp_data,
35
37
  )
36
38
  from parsagon.custom_function import CustomFunction
37
39
  from parsagon.exceptions import ParsagonException
@@ -146,6 +148,7 @@ class Executor:
146
148
  "get_str_about_data": get_str_about_data,
147
149
  "get_bool_about_data": get_bool_about_data,
148
150
  "get_json_about_data": get_json_about_data,
151
+ "get_serp_data": get_serp_data,
149
152
  "get_pdf_text": self.get_pdf_text,
150
153
  }
151
154
  self.custom_functions = {}
@@ -289,6 +292,7 @@ class Executor:
289
292
  parent.remove(lxml_elem)
290
293
  except IndexError:
291
294
  continue
295
+ etree.indent(root)
292
296
  return lxml.html.tostring(root).decode()
293
297
 
294
298
  def get_elem(self, description, elem_type):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: parsagon
3
- Version: 0.14.28
3
+ Version: 0.14.30
4
4
  Summary: Allows you to create browser automations with natural language
5
5
  Author-email: Sandy Suh <sandy@parsagon.io>
6
6
  Project-URL: Homepage, https://parsagon.io
@@ -10,6 +10,7 @@ Requires-Python: >=3.8
10
10
  Description-Content-Type: text/markdown
11
11
  Requires-Dist: selenium==4.9.1
12
12
  Requires-Dist: lxml==4.9.2
13
+ Requires-Dist: cssselect==1.2.0
13
14
  Requires-Dist: httpx==0.27.0
14
15
  Requires-Dist: psutil==5.9.6
15
16
  Requires-Dist: rich==13.6.0
@@ -1,5 +1,6 @@
1
1
  selenium==4.9.1
2
2
  lxml==4.9.2
3
+ cssselect==1.2.0
3
4
  httpx==0.27.0
4
5
  psutil==5.9.6
5
6
  rich==13.6.0
File without changes
File without changes
File without changes