firecrawl 4.12.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.
Files changed (92) hide show
  1. firecrawl/__init__.py +87 -0
  2. firecrawl/__tests__/e2e/v2/aio/conftest.py +62 -0
  3. firecrawl/__tests__/e2e/v2/aio/test_aio_batch_scrape.py +69 -0
  4. firecrawl/__tests__/e2e/v2/aio/test_aio_crawl.py +189 -0
  5. firecrawl/__tests__/e2e/v2/aio/test_aio_extract.py +39 -0
  6. firecrawl/__tests__/e2e/v2/aio/test_aio_map.py +41 -0
  7. firecrawl/__tests__/e2e/v2/aio/test_aio_scrape.py +138 -0
  8. firecrawl/__tests__/e2e/v2/aio/test_aio_search.py +249 -0
  9. firecrawl/__tests__/e2e/v2/aio/test_aio_usage.py +42 -0
  10. firecrawl/__tests__/e2e/v2/aio/test_aio_watcher.py +43 -0
  11. firecrawl/__tests__/e2e/v2/conftest.py +73 -0
  12. firecrawl/__tests__/e2e/v2/test_async.py +73 -0
  13. firecrawl/__tests__/e2e/v2/test_batch_scrape.py +106 -0
  14. firecrawl/__tests__/e2e/v2/test_crawl.py +278 -0
  15. firecrawl/__tests__/e2e/v2/test_extract.py +55 -0
  16. firecrawl/__tests__/e2e/v2/test_map.py +61 -0
  17. firecrawl/__tests__/e2e/v2/test_scrape.py +191 -0
  18. firecrawl/__tests__/e2e/v2/test_search.py +270 -0
  19. firecrawl/__tests__/e2e/v2/test_usage.py +26 -0
  20. firecrawl/__tests__/e2e/v2/test_watcher.py +65 -0
  21. firecrawl/__tests__/unit/test_recursive_schema_v1.py +1209 -0
  22. firecrawl/__tests__/unit/v2/methods/aio/test_aio_crawl_params.py +12 -0
  23. firecrawl/__tests__/unit/v2/methods/aio/test_aio_crawl_request_preparation.py +79 -0
  24. firecrawl/__tests__/unit/v2/methods/aio/test_aio_crawl_validation.py +12 -0
  25. firecrawl/__tests__/unit/v2/methods/aio/test_aio_map_request_preparation.py +20 -0
  26. firecrawl/__tests__/unit/v2/methods/aio/test_aio_scrape_request_preparation.py +50 -0
  27. firecrawl/__tests__/unit/v2/methods/aio/test_aio_search_request_preparation.py +64 -0
  28. firecrawl/__tests__/unit/v2/methods/aio/test_batch_request_preparation_async.py +28 -0
  29. firecrawl/__tests__/unit/v2/methods/aio/test_ensure_async.py +117 -0
  30. firecrawl/__tests__/unit/v2/methods/test_agent.py +367 -0
  31. firecrawl/__tests__/unit/v2/methods/test_agent_request_preparation.py +226 -0
  32. firecrawl/__tests__/unit/v2/methods/test_batch_request_preparation.py +90 -0
  33. firecrawl/__tests__/unit/v2/methods/test_branding.py +214 -0
  34. firecrawl/__tests__/unit/v2/methods/test_crawl_params.py +70 -0
  35. firecrawl/__tests__/unit/v2/methods/test_crawl_request_preparation.py +240 -0
  36. firecrawl/__tests__/unit/v2/methods/test_crawl_validation.py +107 -0
  37. firecrawl/__tests__/unit/v2/methods/test_map_request_preparation.py +54 -0
  38. firecrawl/__tests__/unit/v2/methods/test_pagination.py +671 -0
  39. firecrawl/__tests__/unit/v2/methods/test_scrape_request_preparation.py +109 -0
  40. firecrawl/__tests__/unit/v2/methods/test_search_request_preparation.py +169 -0
  41. firecrawl/__tests__/unit/v2/methods/test_search_validation.py +236 -0
  42. firecrawl/__tests__/unit/v2/methods/test_usage_types.py +18 -0
  43. firecrawl/__tests__/unit/v2/methods/test_webhook.py +123 -0
  44. firecrawl/__tests__/unit/v2/utils/test_metadata_extras.py +94 -0
  45. firecrawl/__tests__/unit/v2/utils/test_metadata_extras_multivalue.py +22 -0
  46. firecrawl/__tests__/unit/v2/utils/test_recursive_schema.py +1133 -0
  47. firecrawl/__tests__/unit/v2/utils/test_validation.py +311 -0
  48. firecrawl/__tests__/unit/v2/watcher/test_ws_watcher.py +332 -0
  49. firecrawl/client.py +281 -0
  50. firecrawl/firecrawl.backup.py +4635 -0
  51. firecrawl/types.py +167 -0
  52. firecrawl/v1/__init__.py +14 -0
  53. firecrawl/v1/client.py +5164 -0
  54. firecrawl/v2/__init__.py +4 -0
  55. firecrawl/v2/client.py +967 -0
  56. firecrawl/v2/client_async.py +408 -0
  57. firecrawl/v2/methods/agent.py +144 -0
  58. firecrawl/v2/methods/aio/__init__.py +1 -0
  59. firecrawl/v2/methods/aio/agent.py +137 -0
  60. firecrawl/v2/methods/aio/batch.py +188 -0
  61. firecrawl/v2/methods/aio/crawl.py +351 -0
  62. firecrawl/v2/methods/aio/extract.py +133 -0
  63. firecrawl/v2/methods/aio/map.py +65 -0
  64. firecrawl/v2/methods/aio/scrape.py +33 -0
  65. firecrawl/v2/methods/aio/search.py +176 -0
  66. firecrawl/v2/methods/aio/usage.py +89 -0
  67. firecrawl/v2/methods/batch.py +499 -0
  68. firecrawl/v2/methods/crawl.py +592 -0
  69. firecrawl/v2/methods/extract.py +161 -0
  70. firecrawl/v2/methods/map.py +83 -0
  71. firecrawl/v2/methods/scrape.py +64 -0
  72. firecrawl/v2/methods/search.py +215 -0
  73. firecrawl/v2/methods/usage.py +84 -0
  74. firecrawl/v2/types.py +1143 -0
  75. firecrawl/v2/utils/__init__.py +9 -0
  76. firecrawl/v2/utils/error_handler.py +107 -0
  77. firecrawl/v2/utils/get_version.py +15 -0
  78. firecrawl/v2/utils/http_client.py +178 -0
  79. firecrawl/v2/utils/http_client_async.py +69 -0
  80. firecrawl/v2/utils/normalize.py +125 -0
  81. firecrawl/v2/utils/validation.py +692 -0
  82. firecrawl/v2/watcher.py +301 -0
  83. firecrawl/v2/watcher_async.py +243 -0
  84. firecrawl-4.12.0.dist-info/METADATA +234 -0
  85. firecrawl-4.12.0.dist-info/RECORD +92 -0
  86. firecrawl-4.12.0.dist-info/WHEEL +5 -0
  87. firecrawl-4.12.0.dist-info/licenses/LICENSE +21 -0
  88. firecrawl-4.12.0.dist-info/top_level.txt +2 -0
  89. tests/test_agent_integration.py +277 -0
  90. tests/test_api_key_handling.py +44 -0
  91. tests/test_change_tracking.py +98 -0
  92. tests/test_timeout_conversion.py +117 -0
firecrawl/types.py ADDED
@@ -0,0 +1,167 @@
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
+ SearchResultWeb,
52
+ SearchResultNews,
53
+ SearchResultImages,
54
+ SearchData,
55
+
56
+ # Action types
57
+ WaitAction,
58
+ ScreenshotAction,
59
+ ClickAction,
60
+ WriteAction,
61
+ PressAction,
62
+ ScrollAction,
63
+ ScrapeAction,
64
+ ExecuteJavascriptAction,
65
+ PDFAction,
66
+
67
+ # Usage types
68
+ QueueStatusResponse,
69
+
70
+ # Location and format types
71
+ Location,
72
+
73
+ # Error types
74
+ ErrorDetails,
75
+ ErrorResponse,
76
+
77
+ # Job management types
78
+ JobStatus,
79
+
80
+ # Webhook types
81
+ WebhookData,
82
+
83
+ # Configuration types
84
+ ClientConfig,
85
+ AgentOptions,
86
+ )
87
+
88
+ __all__ = [
89
+ # Base types
90
+ 'BaseResponse',
91
+
92
+ # Document types
93
+ 'Document',
94
+ 'DocumentMetadata',
95
+
96
+ # Scrape types
97
+ 'ScrapeFormats',
98
+ 'ScrapeOptions',
99
+ 'ScrapeRequest',
100
+ 'ScrapeData',
101
+ 'ScrapeResponse',
102
+
103
+ # Crawl types
104
+ 'CrawlRequest',
105
+ 'CrawlJob',
106
+ 'CrawlJobData',
107
+ 'CrawlResponse',
108
+ 'CrawlParamsRequest',
109
+ 'CrawlParamsData',
110
+ 'CrawlParamsResponse',
111
+ 'CrawlErrorsResponse',
112
+ 'ActiveCrawlsResponse',
113
+
114
+ # Batch scrape types
115
+ 'BatchScrapeRequest',
116
+ 'BatchScrapeJob',
117
+ 'BatchScrapeResponse',
118
+
119
+ # Map types
120
+ 'MapOptions',
121
+ 'MapRequest',
122
+ 'MapData',
123
+ 'MapResponse',
124
+
125
+ # Search types
126
+ 'Source',
127
+ 'SourceOption',
128
+ 'Format',
129
+ 'JsonFormat',
130
+ 'FormatOption',
131
+ 'SearchRequest',
132
+ 'SearchResultWeb',
133
+ 'SearchResultNews',
134
+ 'SearchResultImages',
135
+ 'SearchData',
136
+
137
+ # Action types
138
+ 'WaitAction',
139
+ 'ScreenshotAction',
140
+ 'ClickAction',
141
+ 'WriteAction',
142
+ 'PressAction',
143
+ 'ScrollAction',
144
+ 'ScrapeAction',
145
+ 'ExecuteJavascriptAction',
146
+ 'PDFAction',
147
+
148
+ # Usage types
149
+ 'QueueStatusResponse',
150
+
151
+ # Location and format types
152
+ 'Location',
153
+
154
+ # Error types
155
+ 'ErrorDetails',
156
+ 'ErrorResponse',
157
+
158
+ # Job management types
159
+ 'JobStatus',
160
+
161
+ # Webhook types
162
+ 'WebhookData',
163
+
164
+ # Configuration types
165
+ 'ClientConfig',
166
+ 'AgentOptions',
167
+ ]
@@ -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']