firecrawl 4.1.1__py3-none-any.whl → 4.2.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.
Potentially problematic release.
This version of firecrawl might be problematic. Click here for more details.
- firecrawl/__init__.py +1 -1
- firecrawl/v2/client.py +4 -0
- firecrawl/v2/methods/usage.py +16 -1
- firecrawl/v2/types.py +8 -0
- {firecrawl-4.1.1.dist-info → firecrawl-4.2.0.dist-info}/METADATA +1 -1
- {firecrawl-4.1.1.dist-info → firecrawl-4.2.0.dist-info}/RECORD +9 -9
- {firecrawl-4.1.1.dist-info → firecrawl-4.2.0.dist-info}/WHEEL +0 -0
- {firecrawl-4.1.1.dist-info → firecrawl-4.2.0.dist-info}/licenses/LICENSE +0 -0
- {firecrawl-4.1.1.dist-info → firecrawl-4.2.0.dist-info}/top_level.txt +0 -0
firecrawl/__init__.py
CHANGED
firecrawl/v2/client.py
CHANGED
|
@@ -727,6 +727,10 @@ class FirecrawlClient:
|
|
|
727
727
|
"""Get recent token usage metrics (v2)."""
|
|
728
728
|
return usage_methods.get_token_usage(self.http_client)
|
|
729
729
|
|
|
730
|
+
def get_queue_status(self):
|
|
731
|
+
"""Get metrics about the team's scrape queue."""
|
|
732
|
+
return usage_methods.get_queue_status(self.http_client)
|
|
733
|
+
|
|
730
734
|
def watcher(
|
|
731
735
|
self,
|
|
732
736
|
job_id: str,
|
firecrawl/v2/methods/usage.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from ..utils import HttpClient, handle_response_error
|
|
2
|
-
from ..types import ConcurrencyCheck, CreditUsage, TokenUsage
|
|
2
|
+
from ..types import ConcurrencyCheck, CreditUsage, QueueStatusResponse, TokenUsage
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
def get_concurrency(client: HttpClient) -> ConcurrencyCheck:
|
|
@@ -39,3 +39,18 @@ def get_token_usage(client: HttpClient) -> TokenUsage:
|
|
|
39
39
|
remaining_tokens=data.get("remainingTokens", 0)
|
|
40
40
|
)
|
|
41
41
|
|
|
42
|
+
def get_queue_status(client: HttpClient) -> QueueStatusResponse:
|
|
43
|
+
resp = client.get("/v2/team/queue-status")
|
|
44
|
+
if not resp.ok:
|
|
45
|
+
handle_response_error(resp, "get queue status")
|
|
46
|
+
body = resp.json()
|
|
47
|
+
if not body.get("success"):
|
|
48
|
+
raise Exception(body.get("error", "Unknown error"))
|
|
49
|
+
data = body.get("data", body)
|
|
50
|
+
return QueueStatusResponse(
|
|
51
|
+
jobs_in_queue=data.get("jobsInQueue", 0),
|
|
52
|
+
active_jobs_in_queue=data.get("activeJobsInQueue", 0),
|
|
53
|
+
waiting_jobs_in_queue=data.get("waitingJobsInQueue", 0),
|
|
54
|
+
max_concurrency=data.get("maxConcurrency", 0),
|
|
55
|
+
most_recent_success=data.get("mostRecentSuccess", None),
|
|
56
|
+
)
|
firecrawl/v2/types.py
CHANGED
|
@@ -485,6 +485,14 @@ class TokenUsage(BaseModel):
|
|
|
485
485
|
"""Recent token usage metrics (if available)."""
|
|
486
486
|
remaining_tokens: int
|
|
487
487
|
|
|
488
|
+
class QueueStatusResponse(BaseModel):
|
|
489
|
+
"""Metrics about the team's scrape queue."""
|
|
490
|
+
jobs_in_queue: int
|
|
491
|
+
active_jobs_in_queue: int
|
|
492
|
+
waiting_jobs_in_queue: int
|
|
493
|
+
max_concurrency: int
|
|
494
|
+
most_recent_success: Optional[datetime] = None
|
|
495
|
+
|
|
488
496
|
# Action types
|
|
489
497
|
class WaitAction(BaseModel):
|
|
490
498
|
"""Wait action to perform during scraping."""
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
firecrawl/__init__.py,sha256=
|
|
1
|
+
firecrawl/__init__.py,sha256=Q1g0pK4-cGU0h4fxCZitukNUsV6Voh9jwm6qfTHLgVE,2192
|
|
2
2
|
firecrawl/client.py,sha256=tp3mUo_3aGPuZ53kpU4bhM-5EtwD_IUWrJ7wm0GMuCc,11159
|
|
3
3
|
firecrawl/firecrawl.backup.py,sha256=v1FEN3jR4g5Aupg4xp6SLkuFvYMQuUKND2YELbYjE6c,200430
|
|
4
4
|
firecrawl/types.py,sha256=W9N2pqQuevEIIjYHN9rbDf31E-nwdCECqIn11Foz2T8,2836
|
|
@@ -44,9 +44,9 @@ firecrawl/__tests__/unit/v2/watcher/test_ws_watcher.py,sha256=87w47n0iOihtu4jTR4
|
|
|
44
44
|
firecrawl/v1/__init__.py,sha256=aP1oisPeZVGGZynvENc07JySMOZfv_4zAlxQ0ecMJXA,481
|
|
45
45
|
firecrawl/v1/client.py,sha256=sydurfEFTsXyowyaGryA1lkPxN_r9Nf6iQpM43OwJyM,201672
|
|
46
46
|
firecrawl/v2/__init__.py,sha256=Jc6a8tBjYG5OPkjDM5pl-notyys-7DEj7PLEfepv3fc,137
|
|
47
|
-
firecrawl/v2/client.py,sha256=
|
|
47
|
+
firecrawl/v2/client.py,sha256=UnU4dWq3ggWjXU3-guPoXLYq2HhFZ0WpM6ZotFzqvOM,31414
|
|
48
48
|
firecrawl/v2/client_async.py,sha256=XyzojIJlWatBGlAMish22H-XHkkH9zHsD6MGtAdtFg8,10487
|
|
49
|
-
firecrawl/v2/types.py,sha256=
|
|
49
|
+
firecrawl/v2/types.py,sha256=zcEQB76JKde9hQxVowwOiaYdsqL8NuFJIVBmr4Dfq7I,23514
|
|
50
50
|
firecrawl/v2/watcher.py,sha256=FOU71tqSKxgeuGycu4ye0SLc2dw7clIcoQjPsi-4Csc,14229
|
|
51
51
|
firecrawl/v2/watcher_async.py,sha256=AVjW2mgABniolSsauK4u0FW8ya6WzRUdyEg2R-8vGCw,10278
|
|
52
52
|
firecrawl/v2/methods/batch.py,sha256=jFSIPtvulUrPz3Y3zT1gDNwYEf8Botpfh4GOeYsVYRI,14852
|
|
@@ -55,7 +55,7 @@ firecrawl/v2/methods/extract.py,sha256=-Jr4BtraU3b7hd3JIY73V-S69rUclxyXyUpoQb6DC
|
|
|
55
55
|
firecrawl/v2/methods/map.py,sha256=4SADb0-lkbdOWDmO6k8_TzK0yRti5xsN40N45nUl9uA,2592
|
|
56
56
|
firecrawl/v2/methods/scrape.py,sha256=CSHBwC-P91UfrW3zHirjNAs2h899FKcWvd1DY_4fJdo,1921
|
|
57
57
|
firecrawl/v2/methods/search.py,sha256=6BKiQ1aKJjWBKm9BBtKxFKGD74kCKBeMIp_OgjcDFAw,7673
|
|
58
|
-
firecrawl/v2/methods/usage.py,sha256=
|
|
58
|
+
firecrawl/v2/methods/usage.py,sha256=QS7RDNHl8AG841jbYo6URxeUPUn0DXXeFiijfeTF-_s,2154
|
|
59
59
|
firecrawl/v2/methods/aio/__init__.py,sha256=RocMJnGwnLIvGu3G8ZvY8INkipC7WHZiu2bE31eSyJs,35
|
|
60
60
|
firecrawl/v2/methods/aio/batch.py,sha256=4Uj05ffpMhQA2J_mkvHYYogdXb0IgbKGbomO43b4m94,6741
|
|
61
61
|
firecrawl/v2/methods/aio/crawl.py,sha256=j2Tb2AcGsT6bCiUbB2yjrfvGZqkinUt0tU-SzWmB7Jw,11551
|
|
@@ -71,10 +71,10 @@ firecrawl/v2/utils/http_client.py,sha256=gUrC1CvU5sj03w27Lbq-3-yH38Yi_OXiI01-piw
|
|
|
71
71
|
firecrawl/v2/utils/http_client_async.py,sha256=iy89_bk2HS3afSRHZ8016eMCa9Fk-5MFTntcOHfbPgE,1936
|
|
72
72
|
firecrawl/v2/utils/normalize.py,sha256=nlTU6QRghT1YKZzNZlIQj4STSRuSUGrS9cCErZIcY5w,3636
|
|
73
73
|
firecrawl/v2/utils/validation.py,sha256=qWWiWaVcvODmVxf9rxIVy1j_dyuJCvdMMUoYhvWUEIU,15269
|
|
74
|
-
firecrawl-4.
|
|
74
|
+
firecrawl-4.2.0.dist-info/licenses/LICENSE,sha256=nPCunEDwjRGHlmjvsiDUyIWbkqqyj3Ej84ntnh0g0zA,1084
|
|
75
75
|
tests/test_change_tracking.py,sha256=_IJ5ShLcoj2fHDBaw-nE4I4lHdmDB617ocK_XMHhXps,4177
|
|
76
76
|
tests/test_timeout_conversion.py,sha256=PWlIEMASQNhu4cp1OW_ebklnE9NCiigPnEFCtI5N3w0,3996
|
|
77
|
-
firecrawl-4.
|
|
78
|
-
firecrawl-4.
|
|
79
|
-
firecrawl-4.
|
|
80
|
-
firecrawl-4.
|
|
77
|
+
firecrawl-4.2.0.dist-info/METADATA,sha256=_fYgDWCu5BD73Nxmv9Rwh4JtD9GLSOuxBo6dpXdJzE8,7392
|
|
78
|
+
firecrawl-4.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
79
|
+
firecrawl-4.2.0.dist-info/top_level.txt,sha256=8T3jOaSN5mtLghO-R3MQ8KO290gIX8hmfxQmglBPdLE,16
|
|
80
|
+
firecrawl-4.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|