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.
- firecrawl/__init__.py +87 -0
- firecrawl/__tests__/e2e/v2/aio/conftest.py +62 -0
- firecrawl/__tests__/e2e/v2/aio/test_aio_batch_scrape.py +69 -0
- firecrawl/__tests__/e2e/v2/aio/test_aio_crawl.py +189 -0
- firecrawl/__tests__/e2e/v2/aio/test_aio_extract.py +39 -0
- firecrawl/__tests__/e2e/v2/aio/test_aio_map.py +41 -0
- firecrawl/__tests__/e2e/v2/aio/test_aio_scrape.py +138 -0
- firecrawl/__tests__/e2e/v2/aio/test_aio_search.py +249 -0
- firecrawl/__tests__/e2e/v2/aio/test_aio_usage.py +42 -0
- firecrawl/__tests__/e2e/v2/aio/test_aio_watcher.py +43 -0
- firecrawl/__tests__/e2e/v2/conftest.py +73 -0
- firecrawl/__tests__/e2e/v2/test_async.py +73 -0
- firecrawl/__tests__/e2e/v2/test_batch_scrape.py +106 -0
- firecrawl/__tests__/e2e/v2/test_crawl.py +278 -0
- firecrawl/__tests__/e2e/v2/test_extract.py +55 -0
- firecrawl/__tests__/e2e/v2/test_map.py +61 -0
- firecrawl/__tests__/e2e/v2/test_scrape.py +191 -0
- firecrawl/__tests__/e2e/v2/test_search.py +270 -0
- firecrawl/__tests__/e2e/v2/test_usage.py +26 -0
- firecrawl/__tests__/e2e/v2/test_watcher.py +65 -0
- firecrawl/__tests__/unit/test_recursive_schema_v1.py +1209 -0
- firecrawl/__tests__/unit/v2/methods/aio/test_aio_crawl_params.py +12 -0
- firecrawl/__tests__/unit/v2/methods/aio/test_aio_crawl_request_preparation.py +79 -0
- firecrawl/__tests__/unit/v2/methods/aio/test_aio_crawl_validation.py +12 -0
- firecrawl/__tests__/unit/v2/methods/aio/test_aio_map_request_preparation.py +20 -0
- firecrawl/__tests__/unit/v2/methods/aio/test_aio_scrape_request_preparation.py +50 -0
- firecrawl/__tests__/unit/v2/methods/aio/test_aio_search_request_preparation.py +64 -0
- firecrawl/__tests__/unit/v2/methods/aio/test_batch_request_preparation_async.py +28 -0
- firecrawl/__tests__/unit/v2/methods/aio/test_ensure_async.py +117 -0
- firecrawl/__tests__/unit/v2/methods/test_agent.py +367 -0
- firecrawl/__tests__/unit/v2/methods/test_agent_request_preparation.py +226 -0
- firecrawl/__tests__/unit/v2/methods/test_batch_request_preparation.py +90 -0
- firecrawl/__tests__/unit/v2/methods/test_branding.py +214 -0
- firecrawl/__tests__/unit/v2/methods/test_crawl_params.py +70 -0
- firecrawl/__tests__/unit/v2/methods/test_crawl_request_preparation.py +240 -0
- firecrawl/__tests__/unit/v2/methods/test_crawl_validation.py +107 -0
- firecrawl/__tests__/unit/v2/methods/test_map_request_preparation.py +54 -0
- firecrawl/__tests__/unit/v2/methods/test_pagination.py +671 -0
- firecrawl/__tests__/unit/v2/methods/test_scrape_request_preparation.py +109 -0
- firecrawl/__tests__/unit/v2/methods/test_search_request_preparation.py +169 -0
- firecrawl/__tests__/unit/v2/methods/test_search_validation.py +236 -0
- firecrawl/__tests__/unit/v2/methods/test_usage_types.py +18 -0
- firecrawl/__tests__/unit/v2/methods/test_webhook.py +123 -0
- firecrawl/__tests__/unit/v2/utils/test_metadata_extras.py +94 -0
- firecrawl/__tests__/unit/v2/utils/test_metadata_extras_multivalue.py +22 -0
- firecrawl/__tests__/unit/v2/utils/test_recursive_schema.py +1133 -0
- firecrawl/__tests__/unit/v2/utils/test_validation.py +311 -0
- firecrawl/__tests__/unit/v2/watcher/test_ws_watcher.py +332 -0
- firecrawl/client.py +281 -0
- firecrawl/firecrawl.backup.py +4635 -0
- firecrawl/types.py +167 -0
- firecrawl/v1/__init__.py +14 -0
- firecrawl/v1/client.py +5164 -0
- firecrawl/v2/__init__.py +4 -0
- firecrawl/v2/client.py +967 -0
- firecrawl/v2/client_async.py +408 -0
- firecrawl/v2/methods/agent.py +144 -0
- firecrawl/v2/methods/aio/__init__.py +1 -0
- firecrawl/v2/methods/aio/agent.py +137 -0
- firecrawl/v2/methods/aio/batch.py +188 -0
- firecrawl/v2/methods/aio/crawl.py +351 -0
- firecrawl/v2/methods/aio/extract.py +133 -0
- firecrawl/v2/methods/aio/map.py +65 -0
- firecrawl/v2/methods/aio/scrape.py +33 -0
- firecrawl/v2/methods/aio/search.py +176 -0
- firecrawl/v2/methods/aio/usage.py +89 -0
- firecrawl/v2/methods/batch.py +499 -0
- firecrawl/v2/methods/crawl.py +592 -0
- firecrawl/v2/methods/extract.py +161 -0
- firecrawl/v2/methods/map.py +83 -0
- firecrawl/v2/methods/scrape.py +64 -0
- firecrawl/v2/methods/search.py +215 -0
- firecrawl/v2/methods/usage.py +84 -0
- firecrawl/v2/types.py +1143 -0
- firecrawl/v2/utils/__init__.py +9 -0
- firecrawl/v2/utils/error_handler.py +107 -0
- firecrawl/v2/utils/get_version.py +15 -0
- firecrawl/v2/utils/http_client.py +178 -0
- firecrawl/v2/utils/http_client_async.py +69 -0
- firecrawl/v2/utils/normalize.py +125 -0
- firecrawl/v2/utils/validation.py +692 -0
- firecrawl/v2/watcher.py +301 -0
- firecrawl/v2/watcher_async.py +243 -0
- firecrawl-4.12.0.dist-info/METADATA +234 -0
- firecrawl-4.12.0.dist-info/RECORD +92 -0
- firecrawl-4.12.0.dist-info/WHEEL +5 -0
- firecrawl-4.12.0.dist-info/licenses/LICENSE +21 -0
- firecrawl-4.12.0.dist-info/top_level.txt +2 -0
- tests/test_agent_integration.py +277 -0
- tests/test_api_key_handling.py +44 -0
- tests/test_change_tracking.py +98 -0
- 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
|
+
]
|
firecrawl/v1/__init__.py
ADDED
|
@@ -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']
|