webscout 7.8__py3-none-any.whl → 7.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 webscout might be problematic. Click here for more details.

Files changed (41) hide show
  1. webscout/Bard.py +5 -25
  2. webscout/DWEBS.py +476 -476
  3. webscout/Extra/__init__.py +2 -0
  4. webscout/Extra/autocoder/__init__.py +1 -1
  5. webscout/Extra/autocoder/{rawdog.py → autocoder.py} +849 -849
  6. webscout/Extra/tempmail/__init__.py +26 -0
  7. webscout/Extra/tempmail/async_utils.py +141 -0
  8. webscout/Extra/tempmail/base.py +156 -0
  9. webscout/Extra/tempmail/cli.py +187 -0
  10. webscout/Extra/tempmail/mail_tm.py +361 -0
  11. webscout/Extra/tempmail/temp_mail_io.py +292 -0
  12. webscout/Provider/Deepinfra.py +288 -286
  13. webscout/Provider/ElectronHub.py +709 -716
  14. webscout/Provider/ExaChat.py +20 -5
  15. webscout/Provider/Gemini.py +167 -165
  16. webscout/Provider/Groq.py +38 -24
  17. webscout/Provider/LambdaChat.py +2 -1
  18. webscout/Provider/TextPollinationsAI.py +232 -230
  19. webscout/Provider/__init__.py +0 -4
  20. webscout/Provider/copilot.py +427 -427
  21. webscout/Provider/freeaichat.py +8 -1
  22. webscout/Provider/uncovr.py +312 -299
  23. webscout/Provider/yep.py +64 -12
  24. webscout/__init__.py +38 -36
  25. webscout/cli.py +293 -293
  26. webscout/conversation.py +350 -17
  27. webscout/litprinter/__init__.py +59 -667
  28. webscout/optimizers.py +419 -419
  29. webscout/update_checker.py +14 -12
  30. webscout/version.py +1 -1
  31. webscout/webscout_search.py +1282 -1282
  32. webscout/webscout_search_async.py +813 -813
  33. {webscout-7.8.dist-info → webscout-7.9.dist-info}/METADATA +44 -39
  34. {webscout-7.8.dist-info → webscout-7.9.dist-info}/RECORD +38 -35
  35. webscout/Provider/DARKAI.py +0 -225
  36. webscout/Provider/EDITEE.py +0 -192
  37. webscout/litprinter/colors.py +0 -54
  38. {webscout-7.8.dist-info → webscout-7.9.dist-info}/LICENSE.md +0 -0
  39. {webscout-7.8.dist-info → webscout-7.9.dist-info}/WHEEL +0 -0
  40. {webscout-7.8.dist-info → webscout-7.9.dist-info}/entry_points.txt +0 -0
  41. {webscout-7.8.dist-info → webscout-7.9.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,6 @@
1
+ from pkg_resources import get_distribution, DistributionNotFound as PackageNotFoundError
2
+ def get_package_version(package_name: str) -> str:
3
+ return get_distribution(package_name).version
1
4
  """
2
5
  Webscout Update Checker
3
6
  >>> from webscout import check_for_updates
@@ -10,8 +13,12 @@ from typing import Optional, Dict, Any, Literal
10
13
 
11
14
  import requests
12
15
  from packaging import version
13
- from importlib.metadata import version as get_package_version
14
- from importlib.metadata import PackageNotFoundError
16
+
17
+ # Constants
18
+ PYPI_URL = "https://pypi.org/pypi/webscout/json"
19
+
20
+ # Create a session for HTTP requests
21
+ session = requests.Session()
15
22
 
16
23
  # Version comparison result type
17
24
  VersionCompareResult = Literal[-1, 0, 1]
@@ -31,8 +38,6 @@ def get_installed_version() -> Optional[str]:
31
38
  return get_package_version('webscout')
32
39
  except PackageNotFoundError:
33
40
  return None
34
- except Exception:
35
- return None
36
41
 
37
42
  def get_pypi_version() -> Optional[str]:
38
43
  """Get the latest version available on PyPI.
@@ -46,14 +51,11 @@ def get_pypi_version() -> Optional[str]:
46
51
  '2.0.0'
47
52
  """
48
53
  try:
49
- response = requests.get(
50
- "https://pypi.org/pypi/webscout/json",
51
- timeout=10
52
- )
54
+ response = session.get(PYPI_URL, timeout=10)
53
55
  response.raise_for_status()
54
56
  data: Dict[str, Any] = response.json()
55
57
  return data['info']['version']
56
- except (requests.RequestException, KeyError, ValueError, Exception):
58
+ except (requests.RequestException, KeyError, ValueError):
57
59
  return None
58
60
 
59
61
  def version_compare(v1: str, v2: str) -> VersionCompareResult:
@@ -78,7 +80,7 @@ def version_compare(v1: str, v2: str) -> VersionCompareResult:
78
80
  if version1 > version2:
79
81
  return 1
80
82
  return 0
81
- except (version.InvalidVersion, Exception):
83
+ except version.InvalidVersion:
82
84
  return 0
83
85
 
84
86
  def get_update_message(installed: str, latest: str) -> Optional[str]:
@@ -116,11 +118,11 @@ def check_for_updates() -> Optional[str]:
116
118
  installed_version = get_installed_version()
117
119
  if not installed_version:
118
120
  return None
119
-
121
+
120
122
  latest_version = get_pypi_version()
121
123
  if not latest_version:
122
124
  return None
123
-
125
+
124
126
  return get_update_message(installed_version, latest_version)
125
127
 
126
128
  if __name__ == "__main__":
webscout/version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "7.8"
1
+ __version__ = "7.9"
2
2
  __prog__ = "webscout"