firecrawl-py 2.16.3__py3-none-any.whl → 3.0.2__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.
Files changed (88) hide show
  1. firecrawl/__init__.py +27 -19
  2. firecrawl/__tests__/e2e/v2/aio/test_aio_batch_scrape.py +79 -0
  3. firecrawl/__tests__/e2e/v2/aio/test_aio_crawl.py +189 -0
  4. firecrawl/__tests__/e2e/v2/aio/test_aio_extract.py +38 -0
  5. firecrawl/__tests__/e2e/v2/aio/test_aio_map.py +40 -0
  6. firecrawl/__tests__/e2e/v2/aio/test_aio_scrape.py +137 -0
  7. firecrawl/__tests__/e2e/v2/aio/test_aio_search.py +183 -0
  8. firecrawl/__tests__/e2e/v2/aio/test_aio_usage.py +35 -0
  9. firecrawl/__tests__/e2e/v2/aio/test_aio_watcher.py +43 -0
  10. firecrawl/__tests__/e2e/v2/conftest.py +73 -0
  11. firecrawl/__tests__/e2e/v2/test_async.py +73 -0
  12. firecrawl/__tests__/e2e/v2/test_batch_scrape.py +105 -0
  13. firecrawl/__tests__/e2e/v2/test_crawl.py +276 -0
  14. firecrawl/__tests__/e2e/v2/test_extract.py +54 -0
  15. firecrawl/__tests__/e2e/v2/test_map.py +60 -0
  16. firecrawl/__tests__/e2e/v2/test_scrape.py +154 -0
  17. firecrawl/__tests__/e2e/v2/test_search.py +265 -0
  18. firecrawl/__tests__/e2e/v2/test_usage.py +26 -0
  19. firecrawl/__tests__/e2e/v2/test_watcher.py +65 -0
  20. firecrawl/__tests__/unit/v2/methods/aio/test_aio_crawl_params.py +12 -0
  21. firecrawl/__tests__/unit/v2/methods/aio/test_aio_crawl_request_preparation.py +61 -0
  22. firecrawl/__tests__/unit/v2/methods/aio/test_aio_crawl_validation.py +12 -0
  23. firecrawl/__tests__/unit/v2/methods/aio/test_aio_map_request_preparation.py +19 -0
  24. firecrawl/__tests__/unit/v2/methods/aio/test_aio_scrape_request_preparation.py +50 -0
  25. firecrawl/__tests__/unit/v2/methods/aio/test_aio_search_request_preparation.py +63 -0
  26. firecrawl/__tests__/unit/v2/methods/aio/test_batch_request_preparation_async.py +28 -0
  27. firecrawl/__tests__/unit/v2/methods/aio/test_ensure_async.py +117 -0
  28. firecrawl/__tests__/unit/v2/methods/test_batch_request_preparation.py +90 -0
  29. firecrawl/__tests__/unit/v2/methods/test_crawl_params.py +70 -0
  30. firecrawl/__tests__/unit/v2/methods/test_crawl_request_preparation.py +240 -0
  31. firecrawl/__tests__/unit/v2/methods/test_crawl_validation.py +107 -0
  32. firecrawl/__tests__/unit/v2/methods/test_map_request_preparation.py +53 -0
  33. firecrawl/__tests__/unit/v2/methods/test_scrape_request_preparation.py +92 -0
  34. firecrawl/__tests__/unit/v2/methods/test_search_request_preparation.py +167 -0
  35. firecrawl/__tests__/unit/v2/methods/test_search_validation.py +206 -0
  36. firecrawl/__tests__/unit/v2/methods/test_usage_types.py +18 -0
  37. firecrawl/__tests__/unit/v2/methods/test_webhook.py +123 -0
  38. firecrawl/__tests__/unit/v2/utils/test_validation.py +290 -0
  39. firecrawl/__tests__/unit/v2/watcher/test_ws_watcher.py +332 -0
  40. firecrawl/client.py +241 -0
  41. build/lib/firecrawl/firecrawl.py → firecrawl/firecrawl.backup.py +108 -92
  42. firecrawl/types.py +157 -0
  43. firecrawl/v1/__init__.py +14 -0
  44. firecrawl/{firecrawl.py → v1/client.py} +405 -371
  45. firecrawl/v2/__init__.py +4 -0
  46. firecrawl/v2/client.py +802 -0
  47. firecrawl/v2/client_async.py +250 -0
  48. firecrawl/v2/methods/aio/__init__.py +1 -0
  49. firecrawl/v2/methods/aio/batch.py +85 -0
  50. firecrawl/v2/methods/aio/crawl.py +174 -0
  51. firecrawl/v2/methods/aio/extract.py +126 -0
  52. firecrawl/v2/methods/aio/map.py +59 -0
  53. firecrawl/v2/methods/aio/scrape.py +36 -0
  54. firecrawl/v2/methods/aio/search.py +58 -0
  55. firecrawl/v2/methods/aio/usage.py +42 -0
  56. firecrawl/v2/methods/batch.py +420 -0
  57. firecrawl/v2/methods/crawl.py +468 -0
  58. firecrawl/v2/methods/extract.py +131 -0
  59. firecrawl/v2/methods/map.py +77 -0
  60. firecrawl/v2/methods/scrape.py +68 -0
  61. firecrawl/v2/methods/search.py +173 -0
  62. firecrawl/v2/methods/usage.py +41 -0
  63. firecrawl/v2/types.py +546 -0
  64. firecrawl/v2/utils/__init__.py +9 -0
  65. firecrawl/v2/utils/error_handler.py +107 -0
  66. firecrawl/v2/utils/get_version.py +15 -0
  67. firecrawl/v2/utils/http_client.py +153 -0
  68. firecrawl/v2/utils/http_client_async.py +64 -0
  69. firecrawl/v2/utils/validation.py +324 -0
  70. firecrawl/v2/watcher.py +312 -0
  71. firecrawl/v2/watcher_async.py +245 -0
  72. {firecrawl_py-2.16.3.dist-info → firecrawl_py-3.0.2.dist-info}/LICENSE +0 -0
  73. {firecrawl_py-2.16.3.dist-info → firecrawl_py-3.0.2.dist-info}/METADATA +49 -32
  74. firecrawl_py-3.0.2.dist-info/RECORD +78 -0
  75. {firecrawl_py-2.16.3.dist-info → firecrawl_py-3.0.2.dist-info}/top_level.txt +0 -2
  76. tests/test_timeout_conversion.py +117 -0
  77. build/lib/firecrawl/__init__.py +0 -79
  78. build/lib/firecrawl/__tests__/e2e_withAuth/__init__.py +0 -0
  79. build/lib/firecrawl/__tests__/e2e_withAuth/test.py +0 -170
  80. build/lib/firecrawl/__tests__/v1/e2e_withAuth/__init__.py +0 -0
  81. build/lib/firecrawl/__tests__/v1/e2e_withAuth/test.py +0 -465
  82. build/lib/tests/test_change_tracking.py +0 -98
  83. firecrawl/__tests__/e2e_withAuth/__init__.py +0 -0
  84. firecrawl/__tests__/e2e_withAuth/test.py +0 -170
  85. firecrawl/__tests__/v1/e2e_withAuth/__init__.py +0 -0
  86. firecrawl/__tests__/v1/e2e_withAuth/test.py +0 -465
  87. firecrawl_py-2.16.3.dist-info/RECORD +0 -19
  88. {firecrawl_py-2.16.3.dist-info → firecrawl_py-3.0.2.dist-info}/WHEEL +0 -0
firecrawl/types.py ADDED
@@ -0,0 +1,157 @@
1
+ """
2
+ Unified Firecrawl Types
3
+
4
+ This module provides unified access to Firecrawl types across all API versions.
5
+ Currently exports v2 types as the primary interface.
6
+ """
7
+
8
+ from .v2.types import (
9
+ # Base types
10
+ BaseResponse,
11
+
12
+ # Document types
13
+ Document,
14
+ DocumentMetadata,
15
+
16
+ # Scrape types
17
+ ScrapeFormats,
18
+ ScrapeOptions,
19
+ ScrapeRequest,
20
+ ScrapeData,
21
+ ScrapeResponse,
22
+
23
+ # Crawl types
24
+ CrawlRequest,
25
+ CrawlJob,
26
+ CrawlResponse,
27
+ CrawlParamsRequest,
28
+ CrawlParamsData,
29
+ CrawlParamsResponse,
30
+ CrawlErrorsResponse,
31
+ ActiveCrawlsResponse,
32
+
33
+ # Batch scrape types
34
+ BatchScrapeRequest,
35
+ BatchScrapeJob,
36
+ BatchScrapeResponse,
37
+
38
+ # Map types
39
+ MapOptions,
40
+ MapRequest,
41
+ MapData,
42
+ MapResponse,
43
+
44
+ # Search types
45
+ Source,
46
+ SourceOption,
47
+ Format,
48
+ JsonFormat,
49
+ FormatOption,
50
+ SearchRequest,
51
+ SearchResult,
52
+ SearchData,
53
+ SearchResponse,
54
+
55
+ # Action types
56
+ WaitAction,
57
+ ScreenshotAction,
58
+ ClickAction,
59
+ WriteAction,
60
+ PressAction,
61
+ ScrollAction,
62
+ ScrapeAction,
63
+ ExecuteJavascriptAction,
64
+ PDFAction,
65
+
66
+ # Location and format types
67
+ Location,
68
+
69
+ # Error types
70
+ ErrorDetails,
71
+ ErrorResponse,
72
+
73
+ # Job management types
74
+ JobStatus,
75
+
76
+ # Webhook types
77
+ WebhookData,
78
+
79
+ # Configuration types
80
+ ClientConfig,
81
+ )
82
+
83
+ __all__ = [
84
+ # Base types
85
+ 'BaseResponse',
86
+
87
+ # Document types
88
+ 'Document',
89
+ 'DocumentMetadata',
90
+
91
+ # Scrape types
92
+ 'ScrapeFormats',
93
+ 'ScrapeOptions',
94
+ 'ScrapeRequest',
95
+ 'ScrapeData',
96
+ 'ScrapeResponse',
97
+
98
+ # Crawl types
99
+ 'CrawlRequest',
100
+ 'CrawlJob',
101
+ 'CrawlJobData',
102
+ 'CrawlResponse',
103
+ 'CrawlParamsRequest',
104
+ 'CrawlParamsData',
105
+ 'CrawlParamsResponse',
106
+ 'CrawlErrorsResponse',
107
+ 'ActiveCrawlsResponse',
108
+
109
+ # Batch scrape types
110
+ 'BatchScrapeRequest',
111
+ 'BatchScrapeJob',
112
+ 'BatchScrapeResponse',
113
+
114
+ # Map types
115
+ 'MapOptions',
116
+ 'MapRequest',
117
+ 'MapData',
118
+ 'MapResponse',
119
+
120
+ # Search types
121
+ 'Source',
122
+ 'SourceOption',
123
+ 'Format',
124
+ 'JsonFormat',
125
+ 'FormatOption',
126
+ 'SearchRequest',
127
+ 'SearchResult',
128
+ 'SearchData',
129
+ 'SearchResponse',
130
+
131
+ # Action types
132
+ 'WaitAction',
133
+ 'ScreenshotAction',
134
+ 'ClickAction',
135
+ 'WriteAction',
136
+ 'PressAction',
137
+ 'ScrollAction',
138
+ 'ScrapeAction',
139
+ 'ExecuteJavascriptAction',
140
+ 'PDFAction',
141
+
142
+ # Location and format types
143
+ 'Location',
144
+
145
+ # Error types
146
+ 'ErrorDetails',
147
+ 'ErrorResponse',
148
+
149
+ # Job management types
150
+ 'JobStatus',
151
+
152
+ # Webhook types
153
+ 'WebhookData',
154
+
155
+ # Configuration types
156
+ 'ClientConfig',
157
+ ]
@@ -0,0 +1,14 @@
1
+ """
2
+ Firecrawl v1 API (Legacy)
3
+
4
+ This module provides the legacy v1 API for backward compatibility.
5
+
6
+ Usage:
7
+ from firecrawl.v1 import V1FirecrawlApp
8
+ app = V1FirecrawlApp(api_key="your-api-key")
9
+ result = app.scrape_url("https://example.com")
10
+ """
11
+
12
+ from .client import V1FirecrawlApp, AsyncV1FirecrawlApp, V1JsonConfig, V1ScrapeOptions, V1ChangeTrackingOptions
13
+
14
+ __all__ = ['V1FirecrawlApp', 'AsyncV1FirecrawlApp', 'V1JsonConfig', 'V1ScrapeOptions', 'V1ChangeTrackingOptions']