decodo-sdk 2.4.0__tar.gz → 2.5.0__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 (48) hide show
  1. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/PKG-INFO +9 -18
  2. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/README.md +3 -16
  3. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/pyproject.toml +13 -2
  4. decodo_sdk-2.5.0/src/decodo/__init__.py +116 -0
  5. decodo_sdk-2.5.0/src/decodo/_compat.py +20 -0
  6. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/codegen/web_scraping_api/generate_targets.py +14 -1
  7. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/generated/targets.py +86 -0
  8. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/schema/types.py +3 -1
  9. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/targets.py +1 -1
  10. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo_sdk.egg-info/PKG-INFO +9 -18
  11. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo_sdk.egg-info/SOURCES.txt +2 -0
  12. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo_sdk.egg-info/requires.txt +1 -0
  13. decodo_sdk-2.5.0/tests/test_generated_exports.py +41 -0
  14. decodo_sdk-2.4.0/src/decodo/__init__.py +0 -321
  15. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/LICENSE +0 -0
  16. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/setup.cfg +0 -0
  17. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/api/__init__.py +0 -0
  18. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/api/web_scraping_api.py +0 -0
  19. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/client.py +0 -0
  20. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/codegen/__init__.py +0 -0
  21. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/codegen/codegen.py +0 -0
  22. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/codegen/web_scraping_api/__init__.py +0 -0
  23. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/codegen/web_scraping_api/generate_parameters.py +0 -0
  24. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/codegen/web_scraping_api/shared.py +0 -0
  25. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/codegen/web_scraping_api/types.py +0 -0
  26. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/errors.py +0 -0
  27. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/generated/__init__.py +0 -0
  28. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/generated/decodo.ir.json +0 -0
  29. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/generated/parameters.py +0 -0
  30. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/http.py +0 -0
  31. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/py.typed +0 -0
  32. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/schema/__init__.py +0 -0
  33. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/schema/build_target_meta.py +0 -0
  34. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/schema/bundled_schema.py +0 -0
  35. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/schema/constants.py +0 -0
  36. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/schema/expand_path.py +0 -0
  37. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/schema/remote_schema.py +0 -0
  38. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/schema/resolve_latest_ir.py +0 -0
  39. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/types/__init__.py +0 -0
  40. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/types/data_api.py +0 -0
  41. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/types/requests.py +0 -0
  42. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo/types/responses.py +0 -0
  43. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo_sdk.egg-info/dependency_links.txt +0 -0
  44. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/src/decodo_sdk.egg-info/top_level.txt +0 -0
  45. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/tests/test_client.py +0 -0
  46. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/tests/test_data_api.py +0 -0
  47. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/tests/test_http.py +0 -0
  48. {decodo_sdk-2.4.0 → decodo_sdk-2.5.0}/tests/test_web_scraping_api.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: decodo-sdk
3
- Version: 2.4.0
3
+ Version: 2.5.0
4
4
  Summary: Official Python SDK for the Decodo APIs
5
5
  Author: Decodo
6
6
  License: MIT License
@@ -30,16 +30,20 @@ Project-URL: Documentation, https://help.decodo.com/docs/introduction
30
30
  Project-URL: Repository, https://github.com/Decodo/sdk-python
31
31
  Keywords: decodo,scraping,web-scraping,api
32
32
  Classifier: Programming Language :: Python :: 3
33
+ Classifier: Programming Language :: Python :: 3.10
34
+ Classifier: Programming Language :: Python :: 3.11
33
35
  Classifier: Programming Language :: Python :: 3.12
36
+ Classifier: Programming Language :: Python :: 3.13
34
37
  Classifier: License :: OSI Approved :: MIT License
35
38
  Classifier: Intended Audience :: Developers
36
39
  Classifier: Topic :: Internet :: WWW/HTTP
37
- Requires-Python: >=3.12
40
+ Requires-Python: >=3.10
38
41
  Description-Content-Type: text/markdown
39
42
  License-File: LICENSE
40
43
  Requires-Dist: httpx>=0.27.0
41
44
  Requires-Dist: pydantic>=2.0
42
45
  Requires-Dist: jsonschema>=4.0
46
+ Requires-Dist: typing-extensions>=4.6
43
47
  Provides-Extra: dev
44
48
  Requires-Dist: pytest>=8.0.0; extra == "dev"
45
49
  Requires-Dist: pytest-mock>=3.14.0; extra == "dev"
@@ -50,7 +54,7 @@ Dynamic: license-file
50
54
 
51
55
  # Decodo Python SDK
52
56
 
53
- ![Python](https://img.shields.io/badge/python-%3E%3D3.12-green)
57
+ ![Python](https://img.shields.io/badge/python-%3E%3D3.10-green)
54
58
  ![License](https://img.shields.io/badge/license-MIT-blue)
55
59
 
56
60
  [![](https://dcbadge.limes.pink/api/server/https://discord.gg/Ja8dqKgvbZ)](https://discord.gg/Ja8dqKgvbZ)
@@ -64,7 +68,7 @@ Build scraping workflows for search engines, eCommerce platforms, social media,
64
68
 
65
69
  - Fully typed targets and parameters with IDE autocomplete
66
70
  - Sync, async, and batch scraping methods
67
- - Built on `httpx`, Python 3.12+
71
+ - Built on `httpx`, Python 3.10+
68
72
  - Typed error hierarchy for safer integrations
69
73
  - Built for Python and modern tooling
70
74
 
@@ -84,7 +88,7 @@ Instead of manually constructing HTTP requests and validating payloads, you can
84
88
 
85
89
  ## Requirements
86
90
 
87
- - Python 3.12+
91
+ - Python 3.10+
88
92
 
89
93
  ## Installation
90
94
 
@@ -595,13 +599,8 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
595
599
  | Target | Parameter class | Description | Example input |
596
600
  | ------------------------------ | ----------------------------- | --------------------------------- | ---------------------------------------- |
597
601
  | `Target.GoogleSearch` | `GoogleSearchParams` | Google Search results for a query | `query="coffee shops"` |
598
- | `Target.GoogleMaps` | `GoogleMapsParams` | Google Maps search results | `query="coffee shops brooklyn"` |
599
- | `Target.GoogleShoppingSearch` | `GoogleShoppingSearchParams` | Google Shopping search results | `query="laptop"` |
600
- | `Target.GoogleShoppingProduct` | `GoogleShoppingProductParams` | Google Shopping product page | `query="laptop"` |
601
- | `Target.GoogleSuggest` | `GoogleSuggestParams` | Google Autocomplete suggestions | `query="coffee"` |
602
602
  | `Target.GoogleLens` | `GoogleLensParams` | Google Lens reverse image search | `query="https://example.com/cat.jpg"` |
603
603
  | `Target.GoogleTravelHotels` | `GoogleTravelHotelsParams` | Google Travel hotel listings | `query="hotels in paris"` |
604
- | `Target.GoogleTrendsExplore` | `GoogleTrendsExploreParams` | Google Trends explore data | `query="coffee"` |
605
604
  | `Target.GoogleAds` | `GoogleAdsParams` | Google Ads results for a query | `query="laptop"` |
606
605
  | `Target.BingSearch` | `BingSearchParams` | Bing Search results | `query="electric vehicles"` |
607
606
  | `Target.Bing` | `BingParams` | Raw Bing URL scraping | `url="https://bing.com/search?q=laptop"` |
@@ -621,8 +620,6 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
621
620
  | `Target.TargetProduct` | `TargetProductParams` | Target.com product page by product ID | `product_id="92186007"` |
622
621
  | `Target.TargetSearch` | `TargetSearchParams` | Target.com search results | `query="laptop"` |
623
622
  | `Target.Target` | `TargetStoreParams` | Raw Target.com URL scraping | `url="https://target.com/p/-/A-92186007"` |
624
- | `Target.LowesSearch` | `LowesSearchParams` | Lowe's search results | `query="drill"` |
625
- | `Target.Ecommerce` | `EcommerceParams` | Generic eCommerce page with parser | `url="https://example.com/product/123"` |
626
623
 
627
624
  ### Social media
628
625
 
@@ -631,18 +628,14 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
631
628
  | `Target.RedditPost` | `RedditPostParams` | Reddit post by URL | `url="https://reddit.com/r/nba/comments/..."` |
632
629
  | `Target.RedditSubreddit` | `RedditSubredditParams` | Reddit subreddit by URL | `url="https://reddit.com/r/nba/"` |
633
630
  | `Target.RedditUser` | `RedditUserParams` | Reddit user profile by URL | `url="https://reddit.com/user/example/"` |
634
- | `Target.YoutubeVideo` | `YoutubeVideoParams` | YouTube video by ID | `query="dFu9aKJoqGg"` |
635
631
  | `Target.YoutubeSearch` | `YoutubeSearchParams` | YouTube search results | `query="ambient music"` |
636
- | `Target.YoutubeSearchMax` | `YoutubeSearchMaxParams` | YouTube search results (extended) | `query="ambient music"` |
637
632
  | `Target.YoutubeMetadata` | `YoutubeMetadataParams` | YouTube video metadata by ID | `query="dFu9aKJoqGg"` |
638
- | `Target.YoutubeTranscript` | `YoutubeTranscriptParams` | YouTube video transcript by ID | `query="dFu9aKJoqGg"` |
639
633
  | `Target.YoutubeSubtitles` | `YoutubeSubtitlesParams` | YouTube video subtitles by ID | `query="dFu9aKJoqGg"` |
640
634
  | `Target.YoutubeChannel` | `YoutubeChannelParams` | YouTube channel by handle or ID | `query="@decodo_official"` |
641
635
  | `Target.TiktokPost` | `TiktokPostParams` | TikTok post by URL | `url="https://www.tiktok.com/@nba/video/..."` |
642
636
  | `Target.TiktokShopSearch` | `TiktokShopSearchParams` | TikTok Shop search results | `query="wireless earbuds"` |
643
637
  | `Target.TiktokShopProduct` | `TiktokShopProductParams` | TikTok Shop product page by product ID | `product_id="7100000000000000000"` |
644
638
  | `Target.Tiktok` | `TiktokParams` | Raw TikTok URL scraping | `url="https://www.tiktok.com/@nba"` |
645
- | `Target.InstagramGraphqlProfile` | `InstagramGraphqlProfileParams` | Instagram profile via GraphQL | `query="nba"` |
646
639
 
647
640
  ### AI tools
648
641
 
@@ -671,8 +664,6 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
671
664
  | `Target.Google` | `GoogleParams` | Raw Google URL scraping | `url="https://google.com/search?q=laptop"` |
672
665
  | `Target.Amazon` | `AmazonParams` | Raw Amazon URL scraping | `url="https://amazon.com/dp/B09H74FXNW"` |
673
666
 
674
- > `Target.UniversalEcommerce` isn't listed above because it doesn't accept a primary input parameter like `url`, `query`, `product_id`, or `prompt`. Its parameter class `UniversalEcommerceParams` only accepts optional configuration fields such as `callback_url`.
675
-
676
667
  For the full target list and parameter details, see the API documentation:
677
668
 
678
669
  - [Target list](https://help.decodo.com/docs/web-scraping-api-targets)
@@ -1,6 +1,6 @@
1
1
  # Decodo Python SDK
2
2
 
3
- ![Python](https://img.shields.io/badge/python-%3E%3D3.12-green)
3
+ ![Python](https://img.shields.io/badge/python-%3E%3D3.10-green)
4
4
  ![License](https://img.shields.io/badge/license-MIT-blue)
5
5
 
6
6
  [![](https://dcbadge.limes.pink/api/server/https://discord.gg/Ja8dqKgvbZ)](https://discord.gg/Ja8dqKgvbZ)
@@ -14,7 +14,7 @@ Build scraping workflows for search engines, eCommerce platforms, social media,
14
14
 
15
15
  - Fully typed targets and parameters with IDE autocomplete
16
16
  - Sync, async, and batch scraping methods
17
- - Built on `httpx`, Python 3.12+
17
+ - Built on `httpx`, Python 3.10+
18
18
  - Typed error hierarchy for safer integrations
19
19
  - Built for Python and modern tooling
20
20
 
@@ -34,7 +34,7 @@ Instead of manually constructing HTTP requests and validating payloads, you can
34
34
 
35
35
  ## Requirements
36
36
 
37
- - Python 3.12+
37
+ - Python 3.10+
38
38
 
39
39
  ## Installation
40
40
 
@@ -545,13 +545,8 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
545
545
  | Target | Parameter class | Description | Example input |
546
546
  | ------------------------------ | ----------------------------- | --------------------------------- | ---------------------------------------- |
547
547
  | `Target.GoogleSearch` | `GoogleSearchParams` | Google Search results for a query | `query="coffee shops"` |
548
- | `Target.GoogleMaps` | `GoogleMapsParams` | Google Maps search results | `query="coffee shops brooklyn"` |
549
- | `Target.GoogleShoppingSearch` | `GoogleShoppingSearchParams` | Google Shopping search results | `query="laptop"` |
550
- | `Target.GoogleShoppingProduct` | `GoogleShoppingProductParams` | Google Shopping product page | `query="laptop"` |
551
- | `Target.GoogleSuggest` | `GoogleSuggestParams` | Google Autocomplete suggestions | `query="coffee"` |
552
548
  | `Target.GoogleLens` | `GoogleLensParams` | Google Lens reverse image search | `query="https://example.com/cat.jpg"` |
553
549
  | `Target.GoogleTravelHotels` | `GoogleTravelHotelsParams` | Google Travel hotel listings | `query="hotels in paris"` |
554
- | `Target.GoogleTrendsExplore` | `GoogleTrendsExploreParams` | Google Trends explore data | `query="coffee"` |
555
550
  | `Target.GoogleAds` | `GoogleAdsParams` | Google Ads results for a query | `query="laptop"` |
556
551
  | `Target.BingSearch` | `BingSearchParams` | Bing Search results | `query="electric vehicles"` |
557
552
  | `Target.Bing` | `BingParams` | Raw Bing URL scraping | `url="https://bing.com/search?q=laptop"` |
@@ -571,8 +566,6 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
571
566
  | `Target.TargetProduct` | `TargetProductParams` | Target.com product page by product ID | `product_id="92186007"` |
572
567
  | `Target.TargetSearch` | `TargetSearchParams` | Target.com search results | `query="laptop"` |
573
568
  | `Target.Target` | `TargetStoreParams` | Raw Target.com URL scraping | `url="https://target.com/p/-/A-92186007"` |
574
- | `Target.LowesSearch` | `LowesSearchParams` | Lowe's search results | `query="drill"` |
575
- | `Target.Ecommerce` | `EcommerceParams` | Generic eCommerce page with parser | `url="https://example.com/product/123"` |
576
569
 
577
570
  ### Social media
578
571
 
@@ -581,18 +574,14 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
581
574
  | `Target.RedditPost` | `RedditPostParams` | Reddit post by URL | `url="https://reddit.com/r/nba/comments/..."` |
582
575
  | `Target.RedditSubreddit` | `RedditSubredditParams` | Reddit subreddit by URL | `url="https://reddit.com/r/nba/"` |
583
576
  | `Target.RedditUser` | `RedditUserParams` | Reddit user profile by URL | `url="https://reddit.com/user/example/"` |
584
- | `Target.YoutubeVideo` | `YoutubeVideoParams` | YouTube video by ID | `query="dFu9aKJoqGg"` |
585
577
  | `Target.YoutubeSearch` | `YoutubeSearchParams` | YouTube search results | `query="ambient music"` |
586
- | `Target.YoutubeSearchMax` | `YoutubeSearchMaxParams` | YouTube search results (extended) | `query="ambient music"` |
587
578
  | `Target.YoutubeMetadata` | `YoutubeMetadataParams` | YouTube video metadata by ID | `query="dFu9aKJoqGg"` |
588
- | `Target.YoutubeTranscript` | `YoutubeTranscriptParams` | YouTube video transcript by ID | `query="dFu9aKJoqGg"` |
589
579
  | `Target.YoutubeSubtitles` | `YoutubeSubtitlesParams` | YouTube video subtitles by ID | `query="dFu9aKJoqGg"` |
590
580
  | `Target.YoutubeChannel` | `YoutubeChannelParams` | YouTube channel by handle or ID | `query="@decodo_official"` |
591
581
  | `Target.TiktokPost` | `TiktokPostParams` | TikTok post by URL | `url="https://www.tiktok.com/@nba/video/..."` |
592
582
  | `Target.TiktokShopSearch` | `TiktokShopSearchParams` | TikTok Shop search results | `query="wireless earbuds"` |
593
583
  | `Target.TiktokShopProduct` | `TiktokShopProductParams` | TikTok Shop product page by product ID | `product_id="7100000000000000000"` |
594
584
  | `Target.Tiktok` | `TiktokParams` | Raw TikTok URL scraping | `url="https://www.tiktok.com/@nba"` |
595
- | `Target.InstagramGraphqlProfile` | `InstagramGraphqlProfileParams` | Instagram profile via GraphQL | `query="nba"` |
596
585
 
597
586
  ### AI tools
598
587
 
@@ -621,8 +610,6 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
621
610
  | `Target.Google` | `GoogleParams` | Raw Google URL scraping | `url="https://google.com/search?q=laptop"` |
622
611
  | `Target.Amazon` | `AmazonParams` | Raw Amazon URL scraping | `url="https://amazon.com/dp/B09H74FXNW"` |
623
612
 
624
- > `Target.UniversalEcommerce` isn't listed above because it doesn't accept a primary input parameter like `url`, `query`, `product_id`, or `prompt`. Its parameter class `UniversalEcommerceParams` only accepts optional configuration fields such as `callback_url`.
625
-
626
613
  For the full target list and parameter details, see the API documentation:
627
614
 
628
615
  - [Target list](https://help.decodo.com/docs/web-scraping-api-targets)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "decodo-sdk"
3
- version = "2.4.0"
3
+ version = "2.5.0"
4
4
  description = "Official Python SDK for the Decodo APIs"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -8,16 +8,20 @@ authors = [{ name = "Decodo" }]
8
8
  keywords = ["decodo", "scraping", "web-scraping", "api"]
9
9
  classifiers = [
10
10
  "Programming Language :: Python :: 3",
11
+ "Programming Language :: Python :: 3.10",
12
+ "Programming Language :: Python :: 3.11",
11
13
  "Programming Language :: Python :: 3.12",
14
+ "Programming Language :: Python :: 3.13",
12
15
  "License :: OSI Approved :: MIT License",
13
16
  "Intended Audience :: Developers",
14
17
  "Topic :: Internet :: WWW/HTTP",
15
18
  ]
16
- requires-python = ">=3.12"
19
+ requires-python = ">=3.10"
17
20
  dependencies = [
18
21
  "httpx>=0.27.0",
19
22
  "pydantic>=2.0",
20
23
  "jsonschema>=4.0",
24
+ "typing-extensions>=4.6",
21
25
  ]
22
26
 
23
27
  [project.urls]
@@ -54,6 +58,7 @@ select = ["E", "F", "I", "UP"]
54
58
 
55
59
  [tool.mypy]
56
60
  strict = true
61
+ python_version = "3.10"
57
62
  packages = ["decodo"]
58
63
  exclude = "src/decodo/generated|^examples/|^build/"
59
64
 
@@ -65,3 +70,9 @@ ignore_errors = true
65
70
  [tool.pytest.ini_options]
66
71
  testpaths = ["tests"]
67
72
 
73
+ [tool.semantic_release]
74
+ version_toml = ["pyproject.toml:project.version"]
75
+ commit_parser = "conventional"
76
+
77
+ [tool.semantic_release.branches.main]
78
+ match = "main"
@@ -0,0 +1,116 @@
1
+ from .api.web_scraping_api import WebScrapingApi, WebScrapingApiRoutes
2
+ from .client import DecodoClient, DecodoConfig, WebScrapingApiConfig
3
+ from .errors import (
4
+ AuthenticationError,
5
+ CrawlError,
6
+ CrawlInterruptedError,
7
+ CrawlTimeoutError,
8
+ DecodoError,
9
+ RateLimitError,
10
+ TimeoutError,
11
+ ValidationError,
12
+ )
13
+ from .schema.bundled_schema import BundledSchema
14
+ from .schema.remote_schema import RemoteSchema
15
+ from .schema.types import DecodoSchema, RemoteSchemaLoadOptions
16
+ from .targets import Target, targets
17
+ from .types.data_api import (
18
+ CrawlPage,
19
+ CrawlPagesResponse,
20
+ CrawlRequest,
21
+ CrawlResponse,
22
+ CrawlStatus,
23
+ CrawlStatusResponse,
24
+ MapRequest,
25
+ MapResponse,
26
+ SearchRequest,
27
+ SearchResponse,
28
+ )
29
+ from .types.responses import (
30
+ AsyncTaskResponse,
31
+ BatchResponse,
32
+ ResultEntry,
33
+ SyncResponse,
34
+ TaskMetadata,
35
+ TaskResultsResponse,
36
+ TaskStatus,
37
+ )
38
+
39
+ _GENERATED_PARAMETER_NAMES = ("ParameterMeta", "parameter_meta")
40
+
41
+ _codegen_available = False
42
+ _CODEGEN_NAMES: frozenset[str] = frozenset()
43
+ try:
44
+ from .generated import targets as _generated_targets
45
+ from .generated.parameters import ParameterMeta, parameter_meta # noqa: F401
46
+
47
+ # Read before the star import: generated files from before __all__ was emitted
48
+ # fall through to the "run codegen" hint instead of re-exporting their imports.
49
+ _CODEGEN_NAMES = frozenset([*_GENERATED_PARAMETER_NAMES, *_generated_targets.__all__])
50
+ from .generated.targets import * # noqa: F403
51
+
52
+ _codegen_available = True
53
+ except (ImportError, AttributeError):
54
+ _CODEGEN_NAMES = frozenset()
55
+
56
+
57
+ def _is_codegen_name(name: str) -> bool:
58
+ return name.endswith("Params") or name in {
59
+ *_GENERATED_PARAMETER_NAMES,
60
+ "ScrapeRequest",
61
+ "BatchRequest",
62
+ "target_meta",
63
+ }
64
+
65
+
66
+ def __getattr__(name: str) -> object:
67
+ if not _codegen_available and _is_codegen_name(name):
68
+ raise ImportError(
69
+ f"'{name}' requires generated types. "
70
+ "Editable install: run python -m decodo.codegen.codegen, then use 'from decodo import ...'. "
71
+ "Pip install: run python -m decodo.codegen.codegen --out-dir ./decodo_generated, "
72
+ "then use 'from decodo_generated.targets import ...'."
73
+ )
74
+ raise AttributeError(f"module 'decodo' has no attribute {name!r}")
75
+
76
+
77
+ __all__ = [
78
+ "DecodoClient",
79
+ "DecodoConfig",
80
+ "WebScrapingApiConfig",
81
+ "WebScrapingApi",
82
+ "WebScrapingApiRoutes",
83
+ "BundledSchema",
84
+ "RemoteSchema",
85
+ "DecodoSchema",
86
+ "RemoteSchemaLoadOptions",
87
+ "Target",
88
+ "targets",
89
+ "SyncResponse",
90
+ "AsyncTaskResponse",
91
+ "BatchResponse",
92
+ "TaskMetadata",
93
+ "TaskResultsResponse",
94
+ "TaskStatus",
95
+ "ResultEntry",
96
+ "SearchRequest",
97
+ "SearchResponse",
98
+ "MapRequest",
99
+ "MapResponse",
100
+ "CrawlRequest",
101
+ "CrawlResponse",
102
+ "CrawlStatusResponse",
103
+ "CrawlStatus",
104
+ "CrawlPage",
105
+ "CrawlPagesResponse",
106
+ "DecodoError",
107
+ "AuthenticationError",
108
+ "RateLimitError",
109
+ "ValidationError",
110
+ "TimeoutError",
111
+ "CrawlError",
112
+ "CrawlInterruptedError",
113
+ "CrawlTimeoutError",
114
+ ]
115
+
116
+ __all__ += sorted(_CODEGEN_NAMES)
@@ -0,0 +1,20 @@
1
+ from __future__ import annotations
2
+
3
+ import sys
4
+ from enum import Enum
5
+
6
+ if sys.version_info >= (3, 11):
7
+ from enum import StrEnum
8
+ else:
9
+
10
+ class StrEnum(str, Enum):
11
+ """Backport of ``enum.StrEnum`` (3.11+): members are strings and ``str()`` gives the value."""
12
+
13
+ def __str__(self) -> str:
14
+ return str(self.value)
15
+
16
+ def __format__(self, format_spec: str) -> str:
17
+ return str.__format__(str(self.value), format_spec)
18
+
19
+
20
+ __all__ = ["StrEnum"]
@@ -58,7 +58,7 @@ def _get_targets_enum_file_contents(api: WebScrapingApiIR) -> str:
58
58
  lines.append("# Run `python -m decodo.codegen.codegen` to regenerate when the IR schema changes.")
59
59
  lines.append("from __future__ import annotations")
60
60
  lines.append("")
61
- lines.append("from enum import StrEnum")
61
+ lines.append("from decodo._compat import StrEnum")
62
62
  lines.append("")
63
63
  lines.append("")
64
64
 
@@ -191,6 +191,19 @@ def _get_targets_file_contents(api: WebScrapingApiIR) -> str:
191
191
  lines.append("]")
192
192
  lines.append("")
193
193
 
194
+ exported = [
195
+ *(_class_name(k) for k in target_keys),
196
+ *(_batch_class_name(k) for k in target_keys),
197
+ "ScrapeRequest",
198
+ "BatchRequest",
199
+ "target_meta",
200
+ ]
201
+ lines.append("__all__ = [")
202
+ for name in exported:
203
+ lines.append(f" {json.dumps(name)},")
204
+ lines.append("]")
205
+ lines.append("")
206
+
194
207
  return "\n".join(lines)
195
208
 
196
209
 
@@ -1237,3 +1237,89 @@ BatchRequest = Annotated[
1237
1237
  Union[GoogleSearchBatchParams | GoogleTravelHotelsBatchParams | GoogleBatchParams | GoogleAiModeBatchParams | GoogleAdsBatchParams | GoogleLensBatchParams | BingSearchBatchParams | BingBatchParams | AmazonProductBatchParams | AmazonPricingBatchParams | AmazonSearchBatchParams | AmazonSellersBatchParams | AmazonBestsellersBatchParams | AmazonBatchParams | WalmartProductBatchParams | WalmartSearchBatchParams | WalmartBatchParams | TargetProductBatchParams | TargetSearchBatchParams | TargetStoreBatchParams | UniversalBatchParams | ChatgptBatchParams | PerplexityBatchParams | GeminiBatchParams | BbbBatchParams | AutotraderBatchParams | MobileBatchParams | AirbnbBatchParams | AppleAppStoreBatchParams | TiktokPostBatchParams | TiktokShopSearchBatchParams | TiktokShopProductBatchParams | TiktokBatchParams | RedditPostBatchParams | RedditSubredditBatchParams | RedditUserBatchParams | YoutubeMetadataBatchParams | YoutubeSearchBatchParams | YoutubeSubtitlesBatchParams | YoutubeChannelBatchParams],
1238
1238
  pydantic.Field(discriminator='target'),
1239
1239
  ]
1240
+
1241
+ __all__ = [
1242
+ "GoogleSearchParams",
1243
+ "GoogleTravelHotelsParams",
1244
+ "GoogleParams",
1245
+ "GoogleAiModeParams",
1246
+ "GoogleAdsParams",
1247
+ "GoogleLensParams",
1248
+ "BingSearchParams",
1249
+ "BingParams",
1250
+ "AmazonProductParams",
1251
+ "AmazonPricingParams",
1252
+ "AmazonSearchParams",
1253
+ "AmazonSellersParams",
1254
+ "AmazonBestsellersParams",
1255
+ "AmazonParams",
1256
+ "WalmartProductParams",
1257
+ "WalmartSearchParams",
1258
+ "WalmartParams",
1259
+ "TargetProductParams",
1260
+ "TargetSearchParams",
1261
+ "TargetStoreParams",
1262
+ "UniversalParams",
1263
+ "ChatgptParams",
1264
+ "PerplexityParams",
1265
+ "GeminiParams",
1266
+ "BbbParams",
1267
+ "AutotraderParams",
1268
+ "MobileParams",
1269
+ "AirbnbParams",
1270
+ "AppleAppStoreParams",
1271
+ "TiktokPostParams",
1272
+ "TiktokShopSearchParams",
1273
+ "TiktokShopProductParams",
1274
+ "TiktokParams",
1275
+ "RedditPostParams",
1276
+ "RedditSubredditParams",
1277
+ "RedditUserParams",
1278
+ "YoutubeMetadataParams",
1279
+ "YoutubeSearchParams",
1280
+ "YoutubeSubtitlesParams",
1281
+ "YoutubeChannelParams",
1282
+ "GoogleSearchBatchParams",
1283
+ "GoogleTravelHotelsBatchParams",
1284
+ "GoogleBatchParams",
1285
+ "GoogleAiModeBatchParams",
1286
+ "GoogleAdsBatchParams",
1287
+ "GoogleLensBatchParams",
1288
+ "BingSearchBatchParams",
1289
+ "BingBatchParams",
1290
+ "AmazonProductBatchParams",
1291
+ "AmazonPricingBatchParams",
1292
+ "AmazonSearchBatchParams",
1293
+ "AmazonSellersBatchParams",
1294
+ "AmazonBestsellersBatchParams",
1295
+ "AmazonBatchParams",
1296
+ "WalmartProductBatchParams",
1297
+ "WalmartSearchBatchParams",
1298
+ "WalmartBatchParams",
1299
+ "TargetProductBatchParams",
1300
+ "TargetSearchBatchParams",
1301
+ "TargetStoreBatchParams",
1302
+ "UniversalBatchParams",
1303
+ "ChatgptBatchParams",
1304
+ "PerplexityBatchParams",
1305
+ "GeminiBatchParams",
1306
+ "BbbBatchParams",
1307
+ "AutotraderBatchParams",
1308
+ "MobileBatchParams",
1309
+ "AirbnbBatchParams",
1310
+ "AppleAppStoreBatchParams",
1311
+ "TiktokPostBatchParams",
1312
+ "TiktokShopSearchBatchParams",
1313
+ "TiktokShopProductBatchParams",
1314
+ "TiktokBatchParams",
1315
+ "RedditPostBatchParams",
1316
+ "RedditSubredditBatchParams",
1317
+ "RedditUserBatchParams",
1318
+ "YoutubeMetadataBatchParams",
1319
+ "YoutubeSearchBatchParams",
1320
+ "YoutubeSubtitlesBatchParams",
1321
+ "YoutubeChannelBatchParams",
1322
+ "ScrapeRequest",
1323
+ "BatchRequest",
1324
+ "target_meta",
1325
+ ]
@@ -1,6 +1,8 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import Any, Protocol, Required, TypedDict
3
+ from typing import Any, Protocol
4
+
5
+ from typing_extensions import Required, TypedDict
4
6
 
5
7
 
6
8
  class TargetMeta(TypedDict):
@@ -2,7 +2,7 @@
2
2
  # Run `python -m decodo.codegen.codegen` to regenerate when the IR schema changes.
3
3
  from __future__ import annotations
4
4
 
5
- from enum import StrEnum
5
+ from decodo._compat import StrEnum
6
6
 
7
7
 
8
8
  class Target(StrEnum):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: decodo-sdk
3
- Version: 2.4.0
3
+ Version: 2.5.0
4
4
  Summary: Official Python SDK for the Decodo APIs
5
5
  Author: Decodo
6
6
  License: MIT License
@@ -30,16 +30,20 @@ Project-URL: Documentation, https://help.decodo.com/docs/introduction
30
30
  Project-URL: Repository, https://github.com/Decodo/sdk-python
31
31
  Keywords: decodo,scraping,web-scraping,api
32
32
  Classifier: Programming Language :: Python :: 3
33
+ Classifier: Programming Language :: Python :: 3.10
34
+ Classifier: Programming Language :: Python :: 3.11
33
35
  Classifier: Programming Language :: Python :: 3.12
36
+ Classifier: Programming Language :: Python :: 3.13
34
37
  Classifier: License :: OSI Approved :: MIT License
35
38
  Classifier: Intended Audience :: Developers
36
39
  Classifier: Topic :: Internet :: WWW/HTTP
37
- Requires-Python: >=3.12
40
+ Requires-Python: >=3.10
38
41
  Description-Content-Type: text/markdown
39
42
  License-File: LICENSE
40
43
  Requires-Dist: httpx>=0.27.0
41
44
  Requires-Dist: pydantic>=2.0
42
45
  Requires-Dist: jsonschema>=4.0
46
+ Requires-Dist: typing-extensions>=4.6
43
47
  Provides-Extra: dev
44
48
  Requires-Dist: pytest>=8.0.0; extra == "dev"
45
49
  Requires-Dist: pytest-mock>=3.14.0; extra == "dev"
@@ -50,7 +54,7 @@ Dynamic: license-file
50
54
 
51
55
  # Decodo Python SDK
52
56
 
53
- ![Python](https://img.shields.io/badge/python-%3E%3D3.12-green)
57
+ ![Python](https://img.shields.io/badge/python-%3E%3D3.10-green)
54
58
  ![License](https://img.shields.io/badge/license-MIT-blue)
55
59
 
56
60
  [![](https://dcbadge.limes.pink/api/server/https://discord.gg/Ja8dqKgvbZ)](https://discord.gg/Ja8dqKgvbZ)
@@ -64,7 +68,7 @@ Build scraping workflows for search engines, eCommerce platforms, social media,
64
68
 
65
69
  - Fully typed targets and parameters with IDE autocomplete
66
70
  - Sync, async, and batch scraping methods
67
- - Built on `httpx`, Python 3.12+
71
+ - Built on `httpx`, Python 3.10+
68
72
  - Typed error hierarchy for safer integrations
69
73
  - Built for Python and modern tooling
70
74
 
@@ -84,7 +88,7 @@ Instead of manually constructing HTTP requests and validating payloads, you can
84
88
 
85
89
  ## Requirements
86
90
 
87
- - Python 3.12+
91
+ - Python 3.10+
88
92
 
89
93
  ## Installation
90
94
 
@@ -595,13 +599,8 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
595
599
  | Target | Parameter class | Description | Example input |
596
600
  | ------------------------------ | ----------------------------- | --------------------------------- | ---------------------------------------- |
597
601
  | `Target.GoogleSearch` | `GoogleSearchParams` | Google Search results for a query | `query="coffee shops"` |
598
- | `Target.GoogleMaps` | `GoogleMapsParams` | Google Maps search results | `query="coffee shops brooklyn"` |
599
- | `Target.GoogleShoppingSearch` | `GoogleShoppingSearchParams` | Google Shopping search results | `query="laptop"` |
600
- | `Target.GoogleShoppingProduct` | `GoogleShoppingProductParams` | Google Shopping product page | `query="laptop"` |
601
- | `Target.GoogleSuggest` | `GoogleSuggestParams` | Google Autocomplete suggestions | `query="coffee"` |
602
602
  | `Target.GoogleLens` | `GoogleLensParams` | Google Lens reverse image search | `query="https://example.com/cat.jpg"` |
603
603
  | `Target.GoogleTravelHotels` | `GoogleTravelHotelsParams` | Google Travel hotel listings | `query="hotels in paris"` |
604
- | `Target.GoogleTrendsExplore` | `GoogleTrendsExploreParams` | Google Trends explore data | `query="coffee"` |
605
604
  | `Target.GoogleAds` | `GoogleAdsParams` | Google Ads results for a query | `query="laptop"` |
606
605
  | `Target.BingSearch` | `BingSearchParams` | Bing Search results | `query="electric vehicles"` |
607
606
  | `Target.Bing` | `BingParams` | Raw Bing URL scraping | `url="https://bing.com/search?q=laptop"` |
@@ -621,8 +620,6 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
621
620
  | `Target.TargetProduct` | `TargetProductParams` | Target.com product page by product ID | `product_id="92186007"` |
622
621
  | `Target.TargetSearch` | `TargetSearchParams` | Target.com search results | `query="laptop"` |
623
622
  | `Target.Target` | `TargetStoreParams` | Raw Target.com URL scraping | `url="https://target.com/p/-/A-92186007"` |
624
- | `Target.LowesSearch` | `LowesSearchParams` | Lowe's search results | `query="drill"` |
625
- | `Target.Ecommerce` | `EcommerceParams` | Generic eCommerce page with parser | `url="https://example.com/product/123"` |
626
623
 
627
624
  ### Social media
628
625
 
@@ -631,18 +628,14 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
631
628
  | `Target.RedditPost` | `RedditPostParams` | Reddit post by URL | `url="https://reddit.com/r/nba/comments/..."` |
632
629
  | `Target.RedditSubreddit` | `RedditSubredditParams` | Reddit subreddit by URL | `url="https://reddit.com/r/nba/"` |
633
630
  | `Target.RedditUser` | `RedditUserParams` | Reddit user profile by URL | `url="https://reddit.com/user/example/"` |
634
- | `Target.YoutubeVideo` | `YoutubeVideoParams` | YouTube video by ID | `query="dFu9aKJoqGg"` |
635
631
  | `Target.YoutubeSearch` | `YoutubeSearchParams` | YouTube search results | `query="ambient music"` |
636
- | `Target.YoutubeSearchMax` | `YoutubeSearchMaxParams` | YouTube search results (extended) | `query="ambient music"` |
637
632
  | `Target.YoutubeMetadata` | `YoutubeMetadataParams` | YouTube video metadata by ID | `query="dFu9aKJoqGg"` |
638
- | `Target.YoutubeTranscript` | `YoutubeTranscriptParams` | YouTube video transcript by ID | `query="dFu9aKJoqGg"` |
639
633
  | `Target.YoutubeSubtitles` | `YoutubeSubtitlesParams` | YouTube video subtitles by ID | `query="dFu9aKJoqGg"` |
640
634
  | `Target.YoutubeChannel` | `YoutubeChannelParams` | YouTube channel by handle or ID | `query="@decodo_official"` |
641
635
  | `Target.TiktokPost` | `TiktokPostParams` | TikTok post by URL | `url="https://www.tiktok.com/@nba/video/..."` |
642
636
  | `Target.TiktokShopSearch` | `TiktokShopSearchParams` | TikTok Shop search results | `query="wireless earbuds"` |
643
637
  | `Target.TiktokShopProduct` | `TiktokShopProductParams` | TikTok Shop product page by product ID | `product_id="7100000000000000000"` |
644
638
  | `Target.Tiktok` | `TiktokParams` | Raw TikTok URL scraping | `url="https://www.tiktok.com/@nba"` |
645
- | `Target.InstagramGraphqlProfile` | `InstagramGraphqlProfileParams` | Instagram profile via GraphQL | `query="nba"` |
646
639
 
647
640
  ### AI tools
648
641
 
@@ -671,8 +664,6 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
671
664
  | `Target.Google` | `GoogleParams` | Raw Google URL scraping | `url="https://google.com/search?q=laptop"` |
672
665
  | `Target.Amazon` | `AmazonParams` | Raw Amazon URL scraping | `url="https://amazon.com/dp/B09H74FXNW"` |
673
666
 
674
- > `Target.UniversalEcommerce` isn't listed above because it doesn't accept a primary input parameter like `url`, `query`, `product_id`, or `prompt`. Its parameter class `UniversalEcommerceParams` only accepts optional configuration fields such as `callback_url`.
675
-
676
667
  For the full target list and parameter details, see the API documentation:
677
668
 
678
669
  - [Target list](https://help.decodo.com/docs/web-scraping-api-targets)
@@ -2,6 +2,7 @@ LICENSE
2
2
  README.md
3
3
  pyproject.toml
4
4
  src/decodo/__init__.py
5
+ src/decodo/_compat.py
5
6
  src/decodo/client.py
6
7
  src/decodo/errors.py
7
8
  src/decodo/http.py
@@ -39,5 +40,6 @@ src/decodo_sdk.egg-info/requires.txt
39
40
  src/decodo_sdk.egg-info/top_level.txt
40
41
  tests/test_client.py
41
42
  tests/test_data_api.py
43
+ tests/test_generated_exports.py
42
44
  tests/test_http.py
43
45
  tests/test_web_scraping_api.py
@@ -1,6 +1,7 @@
1
1
  httpx>=0.27.0
2
2
  pydantic>=2.0
3
3
  jsonschema>=4.0
4
+ typing-extensions>=4.6
4
5
 
5
6
  [dev]
6
7
  pytest>=8.0.0
@@ -0,0 +1,41 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ import pytest
6
+
7
+ import decodo
8
+ from decodo.codegen.web_scraping_api.generate_targets import _get_targets_file_contents
9
+
10
+
11
+ class TestGeneratedTargetsAll:
12
+ def test_all_lists_every_generated_class_and_union(self, minimal_ir: dict[str, Any]) -> None:
13
+ namespace: dict[str, Any] = {}
14
+ exec(_get_targets_file_contents(minimal_ir["apis"]["webScrapingApi"]), namespace)
15
+
16
+ assert namespace["__all__"] == [
17
+ "GoogleSearchParams",
18
+ "GoogleSearchBatchParams",
19
+ "ScrapeRequest",
20
+ "BatchRequest",
21
+ "target_meta",
22
+ ]
23
+ for name in namespace["__all__"]:
24
+ assert name in namespace
25
+
26
+
27
+ @pytest.mark.skipif(not decodo._codegen_available, reason="generated types not present")
28
+ class TestPackageExports:
29
+ def test_every_generated_name_is_importable_from_decodo(self) -> None:
30
+ from decodo.generated import parameters, targets
31
+
32
+ for name in targets.__all__:
33
+ assert getattr(decodo, name) is getattr(targets, name)
34
+ assert name in decodo.__all__
35
+ for name in ["ParameterMeta", "parameter_meta"]:
36
+ assert getattr(decodo, name) is getattr(parameters, name)
37
+ assert name in decodo.__all__
38
+
39
+ def test_target_absent_from_ir_raises_attribute_error(self) -> None:
40
+ with pytest.raises(AttributeError):
41
+ decodo.NoSuchTargetParams # noqa: B018
@@ -1,321 +0,0 @@
1
- from .api.web_scraping_api import WebScrapingApi, WebScrapingApiRoutes
2
- from .client import DecodoClient, DecodoConfig, WebScrapingApiConfig
3
- from .errors import (
4
- AuthenticationError,
5
- CrawlError,
6
- CrawlInterruptedError,
7
- CrawlTimeoutError,
8
- DecodoError,
9
- RateLimitError,
10
- TimeoutError,
11
- ValidationError,
12
- )
13
- from .schema.bundled_schema import BundledSchema
14
- from .schema.remote_schema import RemoteSchema
15
- from .schema.types import DecodoSchema, RemoteSchemaLoadOptions
16
- from .targets import Target, targets
17
- from .types.data_api import (
18
- CrawlPage,
19
- CrawlPagesResponse,
20
- CrawlRequest,
21
- CrawlResponse,
22
- CrawlStatus,
23
- CrawlStatusResponse,
24
- MapRequest,
25
- MapResponse,
26
- SearchRequest,
27
- SearchResponse,
28
- )
29
- from .types.responses import (
30
- AsyncTaskResponse,
31
- BatchResponse,
32
- ResultEntry,
33
- SyncResponse,
34
- TaskMetadata,
35
- TaskResultsResponse,
36
- TaskStatus,
37
- )
38
-
39
- _codegen_available = False
40
- try:
41
- from .generated.parameters import ParameterMeta, parameter_meta # noqa: F401
42
- from .generated.targets import ( # noqa: F401
43
- AirbnbBatchParams,
44
- AirbnbParams,
45
- AmazonBatchParams,
46
- AmazonBestsellersBatchParams,
47
- AmazonBestsellersParams,
48
- AmazonParams,
49
- AmazonPricingBatchParams,
50
- AmazonPricingParams,
51
- AmazonProductBatchParams,
52
- AmazonProductParams,
53
- AmazonSearchBatchParams,
54
- AmazonSearchParams,
55
- AmazonSellersBatchParams,
56
- AmazonSellersParams,
57
- AppleAppStoreBatchParams,
58
- AppleAppStoreParams,
59
- AutotraderBatchParams,
60
- AutotraderParams,
61
- BatchRequest,
62
- BbbBatchParams,
63
- BbbParams,
64
- BingBatchParams,
65
- BingParams,
66
- BingSearchBatchParams,
67
- BingSearchParams,
68
- ChatgptBatchParams,
69
- ChatgptParams,
70
- EcommerceBatchParams,
71
- EcommerceParams,
72
- GeminiBatchParams,
73
- GeminiParams,
74
- GoogleAdsBatchParams,
75
- GoogleAdsParams,
76
- GoogleAiModeBatchParams,
77
- GoogleAiModeParams,
78
- GoogleBatchParams,
79
- GoogleLensBatchParams,
80
- GoogleLensParams,
81
- GoogleMapsBatchParams,
82
- GoogleMapsParams,
83
- GoogleParams,
84
- GoogleSearchBatchParams,
85
- GoogleSearchParams,
86
- GoogleShoppingProductBatchParams,
87
- GoogleShoppingProductParams,
88
- GoogleShoppingSearchBatchParams,
89
- GoogleShoppingSearchParams,
90
- GoogleSuggestBatchParams,
91
- GoogleSuggestParams,
92
- GoogleTravelHotelsBatchParams,
93
- GoogleTravelHotelsParams,
94
- GoogleTrendsExploreBatchParams,
95
- GoogleTrendsExploreParams,
96
- InstagramGraphqlProfileBatchParams,
97
- InstagramGraphqlProfileParams,
98
- LowesSearchBatchParams,
99
- LowesSearchParams,
100
- MobileBatchParams,
101
- MobileParams,
102
- PerplexityBatchParams,
103
- PerplexityParams,
104
- RedditPostBatchParams,
105
- RedditPostParams,
106
- RedditSubredditBatchParams,
107
- RedditSubredditParams,
108
- RedditUserBatchParams,
109
- RedditUserParams,
110
- ScrapeRequest,
111
- TargetProductBatchParams,
112
- TargetProductParams,
113
- TargetSearchBatchParams,
114
- TargetSearchParams,
115
- TargetStoreBatchParams,
116
- TargetStoreParams,
117
- TiktokBatchParams,
118
- TiktokParams,
119
- TiktokPostBatchParams,
120
- TiktokPostParams,
121
- TiktokShopProductBatchParams,
122
- TiktokShopProductParams,
123
- TiktokShopSearchBatchParams,
124
- TiktokShopSearchParams,
125
- UniversalBatchParams,
126
- UniversalEcommerceBatchParams,
127
- UniversalEcommerceParams,
128
- UniversalParams,
129
- WalmartBatchParams,
130
- WalmartParams,
131
- WalmartProductBatchParams,
132
- WalmartProductParams,
133
- WalmartSearchBatchParams,
134
- WalmartSearchParams,
135
- YoutubeChannelBatchParams,
136
- YoutubeChannelParams,
137
- YoutubeMetadataBatchParams,
138
- YoutubeMetadataParams,
139
- YoutubeSearchBatchParams,
140
- YoutubeSearchMaxBatchParams,
141
- YoutubeSearchMaxParams,
142
- YoutubeSearchParams,
143
- YoutubeSubtitlesBatchParams,
144
- YoutubeSubtitlesParams,
145
- YoutubeTranscriptBatchParams,
146
- YoutubeTranscriptParams,
147
- YoutubeVideoBatchParams,
148
- YoutubeVideoParams,
149
- target_meta,
150
- )
151
- _codegen_available = True
152
- except ImportError:
153
- pass
154
-
155
- _CODEGEN_NAMES: frozenset[str] = frozenset(
156
- [
157
- "AirbnbBatchParams",
158
- "AirbnbParams",
159
- "AmazonBatchParams",
160
- "AmazonBestsellersBatchParams",
161
- "AmazonBestsellersParams",
162
- "AmazonParams",
163
- "AmazonPricingBatchParams",
164
- "AmazonPricingParams",
165
- "AmazonProductBatchParams",
166
- "AmazonProductParams",
167
- "AmazonSearchBatchParams",
168
- "AmazonSearchParams",
169
- "AmazonSellersBatchParams",
170
- "AmazonSellersParams",
171
- "AppleAppStoreBatchParams",
172
- "AppleAppStoreParams",
173
- "AutotraderBatchParams",
174
- "AutotraderParams",
175
- "BatchRequest",
176
- "BbbBatchParams",
177
- "BbbParams",
178
- "BingBatchParams",
179
- "BingParams",
180
- "BingSearchBatchParams",
181
- "BingSearchParams",
182
- "ChatgptBatchParams",
183
- "ChatgptParams",
184
- "EcommerceBatchParams",
185
- "EcommerceParams",
186
- "GeminiBatchParams",
187
- "GeminiParams",
188
- "GoogleAdsBatchParams",
189
- "GoogleAdsParams",
190
- "GoogleAiModeBatchParams",
191
- "GoogleAiModeParams",
192
- "GoogleBatchParams",
193
- "GoogleLensBatchParams",
194
- "GoogleLensParams",
195
- "GoogleMapsBatchParams",
196
- "GoogleMapsParams",
197
- "GoogleParams",
198
- "GoogleSearchBatchParams",
199
- "GoogleSearchParams",
200
- "GoogleShoppingProductBatchParams",
201
- "GoogleShoppingProductParams",
202
- "GoogleShoppingSearchBatchParams",
203
- "GoogleShoppingSearchParams",
204
- "GoogleSuggestBatchParams",
205
- "GoogleSuggestParams",
206
- "GoogleTravelHotelsBatchParams",
207
- "GoogleTravelHotelsParams",
208
- "GoogleTrendsExploreBatchParams",
209
- "GoogleTrendsExploreParams",
210
- "InstagramGraphqlProfileBatchParams",
211
- "InstagramGraphqlProfileParams",
212
- "LowesSearchBatchParams",
213
- "LowesSearchParams",
214
- "MobileBatchParams",
215
- "MobileParams",
216
- "ParameterMeta",
217
- "PerplexityBatchParams",
218
- "PerplexityParams",
219
- "RedditPostBatchParams",
220
- "RedditPostParams",
221
- "RedditSubredditBatchParams",
222
- "RedditSubredditParams",
223
- "RedditUserBatchParams",
224
- "RedditUserParams",
225
- "ScrapeRequest",
226
- "TargetProductBatchParams",
227
- "TargetProductParams",
228
- "TargetSearchBatchParams",
229
- "TargetSearchParams",
230
- "TargetStoreBatchParams",
231
- "TargetStoreParams",
232
- "TiktokBatchParams",
233
- "TiktokParams",
234
- "TiktokPostBatchParams",
235
- "TiktokPostParams",
236
- "TiktokShopProductBatchParams",
237
- "TiktokShopProductParams",
238
- "TiktokShopSearchBatchParams",
239
- "TiktokShopSearchParams",
240
- "UniversalBatchParams",
241
- "UniversalEcommerceBatchParams",
242
- "UniversalEcommerceParams",
243
- "UniversalParams",
244
- "WalmartBatchParams",
245
- "WalmartParams",
246
- "WalmartProductBatchParams",
247
- "WalmartProductParams",
248
- "WalmartSearchBatchParams",
249
- "WalmartSearchParams",
250
- "YoutubeChannelBatchParams",
251
- "YoutubeChannelParams",
252
- "YoutubeMetadataBatchParams",
253
- "YoutubeMetadataParams",
254
- "YoutubeSearchBatchParams",
255
- "YoutubeSearchMaxBatchParams",
256
- "YoutubeSearchMaxParams",
257
- "YoutubeSearchParams",
258
- "YoutubeSubtitlesBatchParams",
259
- "YoutubeSubtitlesParams",
260
- "YoutubeTranscriptBatchParams",
261
- "YoutubeTranscriptParams",
262
- "YoutubeVideoBatchParams",
263
- "YoutubeVideoParams",
264
- "parameter_meta",
265
- "target_meta",
266
- ]
267
- )
268
-
269
-
270
- def __getattr__(name: str) -> object:
271
- if name in _CODEGEN_NAMES:
272
- raise ImportError(
273
- f"'{name}' requires generated types. "
274
- "Editable install: run python -m decodo.codegen.codegen, then use 'from decodo import ...'. "
275
- "Pip install: run python -m decodo.codegen.codegen --out-dir ./decodo_generated, "
276
- "then use 'from decodo_generated.targets import ...'."
277
- )
278
- raise AttributeError(f"module 'decodo' has no attribute {name!r}")
279
-
280
-
281
- __all__ = [
282
- "DecodoClient",
283
- "DecodoConfig",
284
- "WebScrapingApiConfig",
285
- "WebScrapingApi",
286
- "WebScrapingApiRoutes",
287
- "BundledSchema",
288
- "RemoteSchema",
289
- "DecodoSchema",
290
- "RemoteSchemaLoadOptions",
291
- "Target",
292
- "targets",
293
- "SyncResponse",
294
- "AsyncTaskResponse",
295
- "BatchResponse",
296
- "TaskMetadata",
297
- "TaskResultsResponse",
298
- "TaskStatus",
299
- "ResultEntry",
300
- "SearchRequest",
301
- "SearchResponse",
302
- "MapRequest",
303
- "MapResponse",
304
- "CrawlRequest",
305
- "CrawlResponse",
306
- "CrawlStatusResponse",
307
- "CrawlStatus",
308
- "CrawlPage",
309
- "CrawlPagesResponse",
310
- "DecodoError",
311
- "AuthenticationError",
312
- "RateLimitError",
313
- "ValidationError",
314
- "TimeoutError",
315
- "CrawlError",
316
- "CrawlInterruptedError",
317
- "CrawlTimeoutError",
318
- ]
319
-
320
- if _codegen_available:
321
- __all__ += list(_CODEGEN_NAMES)
File without changes
File without changes