thordata-sdk 1.4.0__py3-none-any.whl → 1.5.0__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.
thordata/__init__.py CHANGED
@@ -3,47 +3,17 @@ Thordata Python SDK
3
3
 
4
4
  Official Python client for Thordata's Proxy Network, SERP API,
5
5
  Universal Scraping API (Web Unlocker), and Web Scraper API.
6
-
7
- Basic Usage:
8
- >>> from thordata import ThordataClient
9
- >>>
10
- >>> client = ThordataClient(
11
- ... scraper_token="your_token",
12
- ... public_token="your_public_token",
13
- ... public_key="your_public_key"
14
- ... )
15
- >>>
16
- >>> # Proxy request
17
- >>> response = client.get("https://httpbin.org/ip")
18
- >>>
19
- >>> # SERP search
20
- >>> results = client.serp_search("python tutorial", engine="google")
21
- >>>
22
- >>> # Universal scrape
23
- >>> html = client.universal_scrape("https://example.com", js_render=True)
24
-
25
- Async Usage:
26
- >>> from thordata import AsyncThordataClient
27
- >>> import asyncio
28
- >>>
29
- >>> async def main():
30
- ... async with AsyncThordataClient(
31
- ... scraper_token="your_token"
32
- ... ) as client:
33
- ... response = await client.get("https://httpbin.org/ip")
34
- >>>
35
- >>> asyncio.run(main())
36
6
  """
37
7
 
38
- __version__ = "1.4.0"
39
- __author__ = "Thordata Developer Team"
8
+ __version__ = "1.5.0"
9
+ __author__ = "Thordata Developer Team/Kael Odin"
40
10
  __email__ = "support@thordata.com"
41
11
 
42
12
  # Main clients
43
13
  from .async_client import AsyncThordataClient
44
14
  from .client import ThordataClient
45
15
 
46
- # Enums
16
+ # Enums (Legacy Import Path)
47
17
  from .enums import (
48
18
  BingSearchType,
49
19
  Continent,
@@ -76,7 +46,7 @@ from .exceptions import (
76
46
  ThordataValidationError,
77
47
  )
78
48
 
79
- # Models
49
+ # Models (Legacy Import Path)
80
50
  from .models import (
81
51
  CommonSettings,
82
52
  ProxyConfig,
@@ -99,12 +69,9 @@ from .retry import RetryConfig
99
69
 
100
70
  # Public API
101
71
  __all__ = [
102
- # Version
103
72
  "__version__",
104
- # Clients
105
73
  "ThordataClient",
106
74
  "AsyncThordataClient",
107
- # Enums
108
75
  "Engine",
109
76
  "GoogleSearchType",
110
77
  "BingSearchType",
@@ -120,7 +87,6 @@ __all__ = [
120
87
  "ProxyHost",
121
88
  "ProxyPort",
122
89
  "GoogleTbm",
123
- # Models
124
90
  "ProxyConfig",
125
91
  "ProxyProduct",
126
92
  "ProxyServer",
@@ -135,7 +101,6 @@ __all__ = [
135
101
  "CommonSettings",
136
102
  "VideoTaskConfig",
137
103
  "TaskStatusResponse",
138
- # Exceptions
139
104
  "ThordataError",
140
105
  "ThordataConfigError",
141
106
  "ThordataNetworkError",
@@ -146,6 +111,5 @@ __all__ = [
146
111
  "ThordataServerError",
147
112
  "ThordataValidationError",
148
113
  "ThordataNotCollectedError",
149
- # Retry
150
114
  "RetryConfig",
151
115
  ]