nimble_python 0.20.0__py3-none-any.whl → 0.21.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.
nimble_python/_client.py CHANGED
@@ -61,13 +61,14 @@ from .types.extract_async_response import ExtractAsyncResponse
61
61
  from .types.extract_batch_response import ExtractBatchResponse
62
62
 
63
63
  if TYPE_CHECKING:
64
- from .resources import jobs, serp, agent, crawl, media, tasks, batches, task_agent, domain_knowledge
64
+ from .resources import jobs, serp, agent, crawl, media, tasks, batches, fast_serp, task_agent, domain_knowledge
65
65
  from .resources.serp import SerpResource, AsyncSerpResource
66
66
  from .resources.agent import AgentResource, AsyncAgentResource
67
67
  from .resources.crawl import CrawlResource, AsyncCrawlResource
68
68
  from .resources.media import MediaResource, AsyncMediaResource
69
69
  from .resources.tasks import TasksResource, AsyncTasksResource
70
70
  from .resources.batches import BatchesResource, AsyncBatchesResource
71
+ from .resources.fast_serp import FastSerpResource, AsyncFastSerpResource
71
72
  from .resources.jobs.jobs import JobsResource, AsyncJobsResource
72
73
  from .resources.domain_knowledge import DomainKnowledgeResource, AsyncDomainKnowledgeResource
73
74
  from .resources.task_agent.task_agent import TaskAgentResource, AsyncTaskAgentResource
@@ -185,6 +186,12 @@ class Nimble(SyncAPIClient):
185
186
 
186
187
  return SerpResource(self)
187
188
 
189
+ @cached_property
190
+ def fast_serp(self) -> FastSerpResource:
191
+ from .resources.fast_serp import FastSerpResource
192
+
193
+ return FastSerpResource(self)
194
+
188
195
  @cached_property
189
196
  def task_agent(self) -> TaskAgentResource:
190
197
  from .resources.task_agent import TaskAgentResource
@@ -3459,6 +3466,12 @@ class AsyncNimble(AsyncAPIClient):
3459
3466
 
3460
3467
  return AsyncSerpResource(self)
3461
3468
 
3469
+ @cached_property
3470
+ def fast_serp(self) -> AsyncFastSerpResource:
3471
+ from .resources.fast_serp import AsyncFastSerpResource
3472
+
3473
+ return AsyncFastSerpResource(self)
3474
+
3462
3475
  @cached_property
3463
3476
  def task_agent(self) -> AsyncTaskAgentResource:
3464
3477
  from .resources.task_agent import AsyncTaskAgentResource
@@ -6687,6 +6700,12 @@ class NimbleWithRawResponse:
6687
6700
 
6688
6701
  return SerpResourceWithRawResponse(self._client.serp)
6689
6702
 
6703
+ @cached_property
6704
+ def fast_serp(self) -> fast_serp.FastSerpResourceWithRawResponse:
6705
+ from .resources.fast_serp import FastSerpResourceWithRawResponse
6706
+
6707
+ return FastSerpResourceWithRawResponse(self._client.fast_serp)
6708
+
6690
6709
  @cached_property
6691
6710
  def task_agent(self) -> task_agent.TaskAgentResourceWithRawResponse:
6692
6711
  from .resources.task_agent import TaskAgentResourceWithRawResponse
@@ -6764,6 +6783,12 @@ class AsyncNimbleWithRawResponse:
6764
6783
 
6765
6784
  return AsyncSerpResourceWithRawResponse(self._client.serp)
6766
6785
 
6786
+ @cached_property
6787
+ def fast_serp(self) -> fast_serp.AsyncFastSerpResourceWithRawResponse:
6788
+ from .resources.fast_serp import AsyncFastSerpResourceWithRawResponse
6789
+
6790
+ return AsyncFastSerpResourceWithRawResponse(self._client.fast_serp)
6791
+
6767
6792
  @cached_property
6768
6793
  def task_agent(self) -> task_agent.AsyncTaskAgentResourceWithRawResponse:
6769
6794
  from .resources.task_agent import AsyncTaskAgentResourceWithRawResponse
@@ -6841,6 +6866,12 @@ class NimbleWithStreamedResponse:
6841
6866
 
6842
6867
  return SerpResourceWithStreamingResponse(self._client.serp)
6843
6868
 
6869
+ @cached_property
6870
+ def fast_serp(self) -> fast_serp.FastSerpResourceWithStreamingResponse:
6871
+ from .resources.fast_serp import FastSerpResourceWithStreamingResponse
6872
+
6873
+ return FastSerpResourceWithStreamingResponse(self._client.fast_serp)
6874
+
6844
6875
  @cached_property
6845
6876
  def task_agent(self) -> task_agent.TaskAgentResourceWithStreamingResponse:
6846
6877
  from .resources.task_agent import TaskAgentResourceWithStreamingResponse
@@ -6918,6 +6949,12 @@ class AsyncNimbleWithStreamedResponse:
6918
6949
 
6919
6950
  return AsyncSerpResourceWithStreamingResponse(self._client.serp)
6920
6951
 
6952
+ @cached_property
6953
+ def fast_serp(self) -> fast_serp.AsyncFastSerpResourceWithStreamingResponse:
6954
+ from .resources.fast_serp import AsyncFastSerpResourceWithStreamingResponse
6955
+
6956
+ return AsyncFastSerpResourceWithStreamingResponse(self._client.fast_serp)
6957
+
6921
6958
  @cached_property
6922
6959
  def task_agent(self) -> task_agent.AsyncTaskAgentResourceWithStreamingResponse:
6923
6960
  from .resources.task_agent import AsyncTaskAgentResourceWithStreamingResponse
nimble_python/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "nimble_python"
4
- __version__ = "0.20.0" # x-release-please-version
4
+ __version__ = "0.21.0" # x-release-please-version
@@ -56,6 +56,14 @@ from .batches import (
56
56
  BatchesResourceWithStreamingResponse,
57
57
  AsyncBatchesResourceWithStreamingResponse,
58
58
  )
59
+ from .fast_serp import (
60
+ FastSerpResource,
61
+ AsyncFastSerpResource,
62
+ FastSerpResourceWithRawResponse,
63
+ AsyncFastSerpResourceWithRawResponse,
64
+ FastSerpResourceWithStreamingResponse,
65
+ AsyncFastSerpResourceWithStreamingResponse,
66
+ )
59
67
  from .task_agent import (
60
68
  TaskAgentResource,
61
69
  AsyncTaskAgentResource,
@@ -116,6 +124,12 @@ __all__ = [
116
124
  "AsyncSerpResourceWithRawResponse",
117
125
  "SerpResourceWithStreamingResponse",
118
126
  "AsyncSerpResourceWithStreamingResponse",
127
+ "FastSerpResource",
128
+ "AsyncFastSerpResource",
129
+ "FastSerpResourceWithRawResponse",
130
+ "AsyncFastSerpResourceWithRawResponse",
131
+ "FastSerpResourceWithStreamingResponse",
132
+ "AsyncFastSerpResourceWithStreamingResponse",
119
133
  "TaskAgentResource",
120
134
  "AsyncTaskAgentResource",
121
135
  "TaskAgentResourceWithRawResponse",
@@ -0,0 +1,293 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal
6
+
7
+ import httpx
8
+
9
+ from ..types import fast_serp_run_params
10
+ from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
11
+ from .._utils import maybe_transform, async_maybe_transform
12
+ from .._compat import cached_property
13
+ from .._resource import SyncAPIResource, AsyncAPIResource
14
+ from .._response import (
15
+ to_raw_response_wrapper,
16
+ to_streamed_response_wrapper,
17
+ async_to_raw_response_wrapper,
18
+ async_to_streamed_response_wrapper,
19
+ )
20
+ from .._base_client import make_request_options
21
+ from ..types.fast_serp_run_response import FastSerpRunResponse
22
+
23
+ __all__ = ["FastSerpResource", "AsyncFastSerpResource"]
24
+
25
+
26
+ class FastSerpResource(SyncAPIResource):
27
+ @cached_property
28
+ def with_raw_response(self) -> FastSerpResourceWithRawResponse:
29
+ """
30
+ This property can be used as a prefix for any HTTP method call to return
31
+ the raw response object instead of the parsed content.
32
+
33
+ For more information, see https://www.github.com/Nimbleway/nimble-python#accessing-raw-response-data-eg-headers
34
+ """
35
+ return FastSerpResourceWithRawResponse(self)
36
+
37
+ @cached_property
38
+ def with_streaming_response(self) -> FastSerpResourceWithStreamingResponse:
39
+ """
40
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
41
+
42
+ For more information, see https://www.github.com/Nimbleway/nimble-python#with_streaming_response
43
+ """
44
+ return FastSerpResourceWithStreamingResponse(self)
45
+
46
+ def run(
47
+ self,
48
+ *,
49
+ search_engine: Literal[
50
+ "google_search",
51
+ "google_sge",
52
+ "google_aio",
53
+ "google_maps_search",
54
+ "google_maps_reviews",
55
+ "google_maps_place",
56
+ "google_news",
57
+ "google_images",
58
+ "bing_search",
59
+ "yandex_search",
60
+ ],
61
+ country: str | Omit = omit,
62
+ device: Literal["desktop", "mobile"] | Omit = omit,
63
+ domain: str | Omit = omit,
64
+ locale: str | Omit = omit,
65
+ location: str | Omit = omit,
66
+ num_results: int | Omit = omit,
67
+ page: int | Omit = omit,
68
+ parse: bool | Omit = omit,
69
+ query: str | Omit = omit,
70
+ render: bool | Omit = omit,
71
+ show_hidden_results: bool | Omit = omit,
72
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
73
+ # The extra values given here take precedence over values defined on the client or passed to this method.
74
+ extra_headers: Headers | None = None,
75
+ extra_query: Query | None = None,
76
+ extra_body: Body | None = None,
77
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
78
+ ) -> FastSerpRunResponse:
79
+ """
80
+ Fast SERP
81
+
82
+ Args:
83
+ search_engine: The search engine to query.
84
+
85
+ country: ISO Alpha-2 country code used to access the target search engine (e.g. US, DE,
86
+ GB).
87
+
88
+ device: Device type used for the search request.
89
+
90
+ domain: Top-level domain for the search engine (e.g. "com", "co.uk", "de").
91
+
92
+ locale: Locale used for the search request.
93
+
94
+ location: Geo-location for the search (canonical Google location name).
95
+
96
+ num_results: Number of results to return (1–100).
97
+
98
+ page: The result page number for pagination.
99
+
100
+ parse: When true, the SERP response is parsed into structured JSON.
101
+
102
+ query: The search keyword or phrase to query.
103
+
104
+ render: Whether to render the page in a browser before extracting.
105
+
106
+ show_hidden_results: When true, disables Google result filtering (filter=0) so omitted/duplicate and
107
+ highly similar pages are also returned. Applies to Google search engines.
108
+
109
+ extra_headers: Send extra headers
110
+
111
+ extra_query: Add additional query parameters to the request
112
+
113
+ extra_body: Add additional JSON properties to the request
114
+
115
+ timeout: Override the client-level default timeout for this request, in seconds
116
+ """
117
+ return self._post(
118
+ "/v1/fast-serp",
119
+ body=maybe_transform(
120
+ {
121
+ "search_engine": search_engine,
122
+ "country": country,
123
+ "device": device,
124
+ "domain": domain,
125
+ "locale": locale,
126
+ "location": location,
127
+ "num_results": num_results,
128
+ "page": page,
129
+ "parse": parse,
130
+ "query": query,
131
+ "render": render,
132
+ "show_hidden_results": show_hidden_results,
133
+ },
134
+ fast_serp_run_params.FastSerpRunParams,
135
+ ),
136
+ options=make_request_options(
137
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
138
+ ),
139
+ cast_to=FastSerpRunResponse,
140
+ )
141
+
142
+
143
+ class AsyncFastSerpResource(AsyncAPIResource):
144
+ @cached_property
145
+ def with_raw_response(self) -> AsyncFastSerpResourceWithRawResponse:
146
+ """
147
+ This property can be used as a prefix for any HTTP method call to return
148
+ the raw response object instead of the parsed content.
149
+
150
+ For more information, see https://www.github.com/Nimbleway/nimble-python#accessing-raw-response-data-eg-headers
151
+ """
152
+ return AsyncFastSerpResourceWithRawResponse(self)
153
+
154
+ @cached_property
155
+ def with_streaming_response(self) -> AsyncFastSerpResourceWithStreamingResponse:
156
+ """
157
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
158
+
159
+ For more information, see https://www.github.com/Nimbleway/nimble-python#with_streaming_response
160
+ """
161
+ return AsyncFastSerpResourceWithStreamingResponse(self)
162
+
163
+ async def run(
164
+ self,
165
+ *,
166
+ search_engine: Literal[
167
+ "google_search",
168
+ "google_sge",
169
+ "google_aio",
170
+ "google_maps_search",
171
+ "google_maps_reviews",
172
+ "google_maps_place",
173
+ "google_news",
174
+ "google_images",
175
+ "bing_search",
176
+ "yandex_search",
177
+ ],
178
+ country: str | Omit = omit,
179
+ device: Literal["desktop", "mobile"] | Omit = omit,
180
+ domain: str | Omit = omit,
181
+ locale: str | Omit = omit,
182
+ location: str | Omit = omit,
183
+ num_results: int | Omit = omit,
184
+ page: int | Omit = omit,
185
+ parse: bool | Omit = omit,
186
+ query: str | Omit = omit,
187
+ render: bool | Omit = omit,
188
+ show_hidden_results: bool | Omit = omit,
189
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
190
+ # The extra values given here take precedence over values defined on the client or passed to this method.
191
+ extra_headers: Headers | None = None,
192
+ extra_query: Query | None = None,
193
+ extra_body: Body | None = None,
194
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
195
+ ) -> FastSerpRunResponse:
196
+ """
197
+ Fast SERP
198
+
199
+ Args:
200
+ search_engine: The search engine to query.
201
+
202
+ country: ISO Alpha-2 country code used to access the target search engine (e.g. US, DE,
203
+ GB).
204
+
205
+ device: Device type used for the search request.
206
+
207
+ domain: Top-level domain for the search engine (e.g. "com", "co.uk", "de").
208
+
209
+ locale: Locale used for the search request.
210
+
211
+ location: Geo-location for the search (canonical Google location name).
212
+
213
+ num_results: Number of results to return (1–100).
214
+
215
+ page: The result page number for pagination.
216
+
217
+ parse: When true, the SERP response is parsed into structured JSON.
218
+
219
+ query: The search keyword or phrase to query.
220
+
221
+ render: Whether to render the page in a browser before extracting.
222
+
223
+ show_hidden_results: When true, disables Google result filtering (filter=0) so omitted/duplicate and
224
+ highly similar pages are also returned. Applies to Google search engines.
225
+
226
+ extra_headers: Send extra headers
227
+
228
+ extra_query: Add additional query parameters to the request
229
+
230
+ extra_body: Add additional JSON properties to the request
231
+
232
+ timeout: Override the client-level default timeout for this request, in seconds
233
+ """
234
+ return await self._post(
235
+ "/v1/fast-serp",
236
+ body=await async_maybe_transform(
237
+ {
238
+ "search_engine": search_engine,
239
+ "country": country,
240
+ "device": device,
241
+ "domain": domain,
242
+ "locale": locale,
243
+ "location": location,
244
+ "num_results": num_results,
245
+ "page": page,
246
+ "parse": parse,
247
+ "query": query,
248
+ "render": render,
249
+ "show_hidden_results": show_hidden_results,
250
+ },
251
+ fast_serp_run_params.FastSerpRunParams,
252
+ ),
253
+ options=make_request_options(
254
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
255
+ ),
256
+ cast_to=FastSerpRunResponse,
257
+ )
258
+
259
+
260
+ class FastSerpResourceWithRawResponse:
261
+ def __init__(self, fast_serp: FastSerpResource) -> None:
262
+ self._fast_serp = fast_serp
263
+
264
+ self.run = to_raw_response_wrapper(
265
+ fast_serp.run,
266
+ )
267
+
268
+
269
+ class AsyncFastSerpResourceWithRawResponse:
270
+ def __init__(self, fast_serp: AsyncFastSerpResource) -> None:
271
+ self._fast_serp = fast_serp
272
+
273
+ self.run = async_to_raw_response_wrapper(
274
+ fast_serp.run,
275
+ )
276
+
277
+
278
+ class FastSerpResourceWithStreamingResponse:
279
+ def __init__(self, fast_serp: FastSerpResource) -> None:
280
+ self._fast_serp = fast_serp
281
+
282
+ self.run = to_streamed_response_wrapper(
283
+ fast_serp.run,
284
+ )
285
+
286
+
287
+ class AsyncFastSerpResourceWithStreamingResponse:
288
+ def __init__(self, fast_serp: AsyncFastSerpResource) -> None:
289
+ self._fast_serp = fast_serp
290
+
291
+ self.run = async_to_streamed_response_wrapper(
292
+ fast_serp.run,
293
+ )
@@ -47,6 +47,7 @@ from .crawl_list_response import CrawlListResponse as CrawlListResponse
47
47
  from .job_create_response import JobCreateResponse as JobCreateResponse
48
48
  from .job_update_response import JobUpdateResponse as JobUpdateResponse
49
49
  from .client_search_params import ClientSearchParams as ClientSearchParams
50
+ from .fast_serp_run_params import FastSerpRunParams as FastSerpRunParams
50
51
  from .agent_generate_params import AgentGenerateParams as AgentGenerateParams
51
52
  from .client_extract_params import ClientExtractParams as ClientExtractParams
52
53
  from .crawl_status_response import CrawlStatusResponse as CrawlStatusResponse
@@ -58,6 +59,7 @@ from .agent_run_async_params import AgentRunAsyncParams as AgentRunAsyncParams
58
59
  from .agent_run_batch_params import AgentRunBatchParams as AgentRunBatchParams
59
60
  from .extract_async_response import ExtractAsyncResponse as ExtractAsyncResponse
60
61
  from .extract_batch_response import ExtractBatchResponse as ExtractBatchResponse
62
+ from .fast_serp_run_response import FastSerpRunResponse as FastSerpRunResponse
61
63
  from .media_run_async_params import MediaRunAsyncParams as MediaRunAsyncParams
62
64
  from .task_agent_list_params import TaskAgentListParams as TaskAgentListParams
63
65
  from .agent_generate_response import AgentGenerateResponse as AgentGenerateResponse
@@ -0,0 +1,64 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ __all__ = ["FastSerpRunParams"]
8
+
9
+
10
+ class FastSerpRunParams(TypedDict, total=False):
11
+ search_engine: Required[
12
+ Literal[
13
+ "google_search",
14
+ "google_sge",
15
+ "google_aio",
16
+ "google_maps_search",
17
+ "google_maps_reviews",
18
+ "google_maps_place",
19
+ "google_news",
20
+ "google_images",
21
+ "bing_search",
22
+ "yandex_search",
23
+ ]
24
+ ]
25
+ """The search engine to query."""
26
+
27
+ country: str
28
+ """ISO Alpha-2 country code used to access the target search engine (e.g.
29
+
30
+ US, DE, GB).
31
+ """
32
+
33
+ device: Literal["desktop", "mobile"]
34
+ """Device type used for the search request."""
35
+
36
+ domain: str
37
+ """Top-level domain for the search engine (e.g. "com", "co.uk", "de")."""
38
+
39
+ locale: str
40
+ """Locale used for the search request."""
41
+
42
+ location: str
43
+ """Geo-location for the search (canonical Google location name)."""
44
+
45
+ num_results: int
46
+ """Number of results to return (1–100)."""
47
+
48
+ page: int
49
+ """The result page number for pagination."""
50
+
51
+ parse: bool
52
+ """When true, the SERP response is parsed into structured JSON."""
53
+
54
+ query: str
55
+ """The search keyword or phrase to query."""
56
+
57
+ render: bool
58
+ """Whether to render the page in a browser before extracting."""
59
+
60
+ show_hidden_results: bool
61
+ """
62
+ When true, disables Google result filtering (filter=0) so omitted/duplicate and
63
+ highly similar pages are also returned. Applies to Google search engines.
64
+ """
@@ -0,0 +1,339 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, List, Union, Optional
4
+ from typing_extensions import Literal, TypeAlias
5
+
6
+ from pydantic import Field as FieldInfo
7
+
8
+ from .._models import BaseModel
9
+
10
+ __all__ = [
11
+ "FastSerpRunResponse",
12
+ "Data",
13
+ "DataBrowserActions",
14
+ "DataBrowserActionsResult",
15
+ "DataNetworkCapture",
16
+ "DataNetworkCaptureFilter",
17
+ "DataNetworkCaptureFilterURL",
18
+ "DataNetworkCaptureResult",
19
+ "DataNetworkCaptureResultRequest",
20
+ "DataNetworkCaptureResultResponse",
21
+ "DataParsing",
22
+ "DataParsingParsingSuccessResult",
23
+ "DataParsingParsingErrorResult",
24
+ "DataRedirect",
25
+ "Metadata",
26
+ "Debug",
27
+ "Pagination",
28
+ "PaginationNextPageParams",
29
+ "PaginationUnionMember1",
30
+ ]
31
+
32
+
33
+ class DataBrowserActionsResult(BaseModel):
34
+ duration: float
35
+
36
+ name: Literal[
37
+ "goto",
38
+ "wait",
39
+ "wait_for_element",
40
+ "wait_for_navigation",
41
+ "click",
42
+ "fill",
43
+ "press",
44
+ "scroll",
45
+ "auto_scroll",
46
+ "screenshot",
47
+ "get_cookies",
48
+ "eval",
49
+ "fetch",
50
+ ]
51
+
52
+ status: Literal["no-run", "in-progress", "done", "error", "skipped"]
53
+
54
+ error: Optional[str] = None
55
+
56
+ result: Optional[object] = None
57
+
58
+
59
+ class DataBrowserActions(BaseModel):
60
+ """Browser actions execution results.
61
+
62
+ Present only when browser_actions were specified in the request.
63
+ """
64
+
65
+ results: List[DataBrowserActionsResult]
66
+
67
+ success: bool
68
+
69
+ total_duration: float
70
+
71
+
72
+ class DataNetworkCaptureFilterURL(BaseModel):
73
+ type: Literal["exact", "contains"]
74
+
75
+ value: str
76
+
77
+
78
+ class DataNetworkCaptureFilter(BaseModel):
79
+ validation: bool
80
+
81
+ wait_for_requests_count: float
82
+
83
+ method: Optional[Literal["GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] = None
84
+
85
+ resource_type: Union[
86
+ Literal[
87
+ "document",
88
+ "stylesheet",
89
+ "image",
90
+ "media",
91
+ "font",
92
+ "script",
93
+ "texttrack",
94
+ "xhr",
95
+ "fetch",
96
+ "prefetch",
97
+ "eventsource",
98
+ "websocket",
99
+ "manifest",
100
+ "signedexchange",
101
+ "ping",
102
+ "cspviolationreport",
103
+ "preflight",
104
+ "other",
105
+ "fedcm",
106
+ ],
107
+ List[
108
+ Literal[
109
+ "document",
110
+ "stylesheet",
111
+ "image",
112
+ "media",
113
+ "font",
114
+ "script",
115
+ "texttrack",
116
+ "xhr",
117
+ "fetch",
118
+ "prefetch",
119
+ "eventsource",
120
+ "websocket",
121
+ "manifest",
122
+ "signedexchange",
123
+ "ping",
124
+ "cspviolationreport",
125
+ "preflight",
126
+ "other",
127
+ "fedcm",
128
+ ]
129
+ ],
130
+ None,
131
+ ] = None
132
+ """Resource type for network capture filtering"""
133
+
134
+ status_code: Union[float, List[float], None] = None
135
+
136
+ url: Optional[DataNetworkCaptureFilterURL] = None
137
+
138
+ wait_for_requests_count_timeout: Optional[float] = None
139
+
140
+
141
+ class DataNetworkCaptureResultRequest(BaseModel):
142
+ headers: Dict[str, str]
143
+
144
+ method: str
145
+
146
+ resource_type: Literal[
147
+ "document",
148
+ "stylesheet",
149
+ "image",
150
+ "media",
151
+ "font",
152
+ "script",
153
+ "texttrack",
154
+ "xhr",
155
+ "fetch",
156
+ "prefetch",
157
+ "eventsource",
158
+ "websocket",
159
+ "manifest",
160
+ "signedexchange",
161
+ "ping",
162
+ "cspviolationreport",
163
+ "preflight",
164
+ "other",
165
+ "fedcm",
166
+ ]
167
+ """Resource type for network capture filtering"""
168
+
169
+ url: str
170
+
171
+ body: Optional[str] = None
172
+
173
+
174
+ class DataNetworkCaptureResultResponse(BaseModel):
175
+ body: str
176
+
177
+ headers: Dict[str, str]
178
+
179
+ serialization: Literal["none", "base64"]
180
+
181
+ status: float
182
+
183
+ status_text: str
184
+
185
+
186
+ class DataNetworkCaptureResult(BaseModel):
187
+ request: DataNetworkCaptureResultRequest
188
+
189
+ response: DataNetworkCaptureResultResponse
190
+
191
+
192
+ class DataNetworkCapture(BaseModel):
193
+ filter: DataNetworkCaptureFilter
194
+
195
+ results: List[DataNetworkCaptureResult]
196
+
197
+ error_message: Optional[str] = FieldInfo(alias="errorMessage", default=None)
198
+
199
+
200
+ class DataParsingParsingSuccessResult(BaseModel):
201
+ entities: Dict[str, object]
202
+
203
+ status: Literal["success"]
204
+
205
+
206
+ class DataParsingParsingErrorResult(BaseModel):
207
+ error: str
208
+
209
+ status: Literal["error"]
210
+
211
+
212
+ DataParsing: TypeAlias = Union[DataParsingParsingSuccessResult, DataParsingParsingErrorResult, Dict[str, object]]
213
+
214
+
215
+ class DataRedirect(BaseModel):
216
+ status_code: float
217
+
218
+ url: str
219
+
220
+
221
+ class Data(BaseModel):
222
+ browser_actions: Optional[DataBrowserActions] = None
223
+ """Browser actions execution results.
224
+
225
+ Present only when browser_actions were specified in the request.
226
+ """
227
+
228
+ cookies: Optional[List[object]] = None
229
+ """The cookies collected from browser actions during the task."""
230
+
231
+ eval: Optional[List[object]] = None
232
+ """The evaluation results from browser actions during the task."""
233
+
234
+ fetch: Optional[List[object]] = None
235
+ """The http requests from browser actions made during the task."""
236
+
237
+ headers: Optional[Dict[str, str]] = None
238
+ """The headers received during the task."""
239
+
240
+ html: Optional[str] = None
241
+ """The HTML content of the page."""
242
+
243
+ links: Optional[List[str]] = None
244
+ """List of all unique URLs found on the page."""
245
+
246
+ markdown: Optional[str] = None
247
+ """The Markdown version of the HTML content."""
248
+
249
+ network_capture: Optional[List[DataNetworkCapture]] = None
250
+ """The network capture data collected during the task."""
251
+
252
+ pages_html: Optional[List[str]] = None
253
+ """Individual HTML content of each pagination page, before merging."""
254
+
255
+ parsing: Optional[DataParsing] = None
256
+ """The parsing results extracted from the HTML & network content."""
257
+
258
+ redirects: Optional[List[DataRedirect]] = None
259
+ """The list of redirects that occurred during the task."""
260
+
261
+ screenshots: Optional[List[object]] = None
262
+ """
263
+ Screenshots taken during the task, from browser actions, or the screenshot
264
+ format.
265
+ """
266
+
267
+
268
+ class Metadata(BaseModel):
269
+ agent: Optional[str] = None
270
+ """The name of the agent used for the query."""
271
+
272
+ driver: Optional[str] = None
273
+ """The driver used for the task."""
274
+
275
+ localization_id: Optional[str] = None
276
+ """The localization identifier for the query."""
277
+
278
+ query_duration: Optional[float] = None
279
+ """The duration in milliseconds of the query processing."""
280
+
281
+ query_time: Optional[str] = None
282
+ """The time when the query was received."""
283
+
284
+ response_parameters: Optional[object] = None
285
+ """Additional response parameters."""
286
+
287
+ tag: Optional[str] = None
288
+ """A tag associated with the query."""
289
+
290
+
291
+ class Debug(BaseModel):
292
+ performance_metrics: Optional[Dict[str, float]] = None
293
+ """Performance metrics collected during the task."""
294
+
295
+ proxy_total_bytes_usage: Optional[float] = None
296
+ """Total bytes used by the proxy during the task."""
297
+
298
+ transformed_output: Optional[object] = None
299
+ """The transformed output after applying any transformations."""
300
+
301
+ userbrowser: Optional[object] = None
302
+ """The userbrowser instance using during the task."""
303
+
304
+
305
+ class PaginationNextPageParams(BaseModel):
306
+ next_page_params: Dict[str, object]
307
+
308
+
309
+ class PaginationUnionMember1(BaseModel):
310
+ next_page_params: Dict[str, object]
311
+
312
+
313
+ Pagination: TypeAlias = Union[PaginationNextPageParams, List[PaginationUnionMember1]]
314
+
315
+
316
+ class FastSerpRunResponse(BaseModel):
317
+ data: Data
318
+
319
+ metadata: Metadata
320
+
321
+ status: Literal["success", "skipped", "fatal", "error", "postponed", "ignored", "rejected", "blocked"]
322
+ """The status of the task."""
323
+
324
+ task_id: str
325
+ """Unique identifier for the task."""
326
+
327
+ url: str
328
+ """The final URL."""
329
+
330
+ debug: Optional[Debug] = None
331
+
332
+ pagination: Optional[Pagination] = None
333
+ """Pagination information if applicable."""
334
+
335
+ status_code: Optional[float] = None
336
+ """The HTTP status code of the task."""
337
+
338
+ warnings: Optional[List[str]] = None
339
+ """List of warnings generated during the task."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: nimble_python
3
- Version: 0.20.0
3
+ Version: 0.21.0
4
4
  Summary: The official Python library for the nimble API
5
5
  Project-URL: Homepage, https://github.com/Nimbleway/nimble-python
6
6
  Project-URL: Repository, https://github.com/Nimbleway/nimble-python
@@ -1,6 +1,6 @@
1
1
  nimble_python/__init__.py,sha256=QWpm5I50gjoMEPPXsRiT0i3aqvsJby6NegnPHYrhCfs,2645
2
2
  nimble_python/_base_client.py,sha256=GVMopeALSRNw5GTAmUQfFvON3_tSKYw-MjKo8lDRfos,73932
3
- nimble_python/_client.py,sha256=d-qY78zc2eX7emWgSvXyo4Fo5yRWWqZgmc00ubn3gH0,174580
3
+ nimble_python/_client.py,sha256=qCMYrp3dd1qAGxAi18F_8o6to3sTDzbBU7YEjOauaA8,176025
4
4
  nimble_python/_compat.py,sha256=_9guQfzYnL3DNtudX5W7T2cdSskx89B5AFfhPQDxMUk,6811
5
5
  nimble_python/_constants.py,sha256=giUwuSKDnpjRLaHvgzErnXB3CSYjKMaI5xnBQJI-23s,464
6
6
  nimble_python/_exceptions.py,sha256=x1M0s_wI9jkJ5ARR07APUuDZfxl7BjQ53snlFU-jAoQ,3220
@@ -11,7 +11,7 @@ nimble_python/_resource.py,sha256=TDtzjUMbNHRGQNq-4HJqce3T3THBD5Q7ESrONYPvKdI,11
11
11
  nimble_python/_response.py,sha256=hrLOCn3D0gCapH31eR9BVOgBpTYliUTVUsdeWc1J76A,28983
12
12
  nimble_python/_streaming.py,sha256=StqGzUAIG9gQNCkRQnEAbN3IyiX4hDdCp2QR7_DANw8,10550
13
13
  nimble_python/_types.py,sha256=rYClHO7LPhg_rRUmxWuC34Tf2mVPfmCZBIANhQ2fC3o,7709
14
- nimble_python/_version.py,sha256=AjKYAokwwPRnCZsme2iuN_DURFAosFDdE8VzvLzvgKk,166
14
+ nimble_python/_version.py,sha256=jl823KJq9Giw46Ew2crhmdc3TDEf974aGq6FBHUgZAM,166
15
15
  nimble_python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  nimble_python/_utils/__init__.py,sha256=nQq-iFa5YxTaWySaLigatew5rHgTR0M75FNYm4mrO1s,2313
17
17
  nimble_python/_utils/_compat.py,sha256=33246eDcl3pwL6kWsEhVuT4Akrd8gZEW9LPTm465ohk,1231
@@ -28,11 +28,12 @@ nimble_python/_utils/_transform.py,sha256=NjCzmnfqYrsAikUHQig6N9QfuTVbKipuP3ur9m
28
28
  nimble_python/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,4786
29
29
  nimble_python/_utils/_utils.py,sha256=2nPOzDrPe2GADpLCRM4bNQS8Mu7LjEiCG_LJ2AAL6jg,13111
30
30
  nimble_python/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
31
- nimble_python/resources/__init__.py,sha256=KNqIDLUtFlrEUotM1BhBPVzcgtnjzqxGZ_Nys9xhThc,4219
31
+ nimble_python/resources/__init__.py,sha256=fEdOPLxbknKr1fG3dPZCaz4BaepPQXiILm1ZsjLcitc,4696
32
32
  nimble_python/resources/agent.py,sha256=gbg6brKI85KN_YXWBLyRvKPc4dORDGxpuB6M0Zkqd-E,34849
33
33
  nimble_python/resources/batches.py,sha256=LxPXo7mpDcXmtJAv7prVnDpJHkhHypix6ZNSxh9kpQU,11688
34
34
  nimble_python/resources/crawl.py,sha256=GOMDGANIPAfay-J3ujW9ghlK-h-aIy99ChIKRN-pZK8,20651
35
35
  nimble_python/resources/domain_knowledge.py,sha256=9mY_-oYkZqBxavLJmWzwSh_7vvTloppOqQL9KMKHd1I,7378
36
+ nimble_python/resources/fast_serp.py,sha256=3hmuwIUbLju6BMNQR7CJQUA0lB2n2J4NIbSZTw2zQnM,10510
36
37
  nimble_python/resources/media.py,sha256=CK0czHssE1GpQYUlCOv4WxsdmYT4DStmcg7ygY4REeA,12363
37
38
  nimble_python/resources/serp.py,sha256=xkUv64bmkE59yK_SjYZFPrJBb0YcD1Zg1_VbRBOwFyQ,23472
38
39
  nimble_python/resources/tasks.py,sha256=8rV6YZNpx8rq_83L8UZvt7HlPlRhY8SGrbVQAFDjBtM,13021
@@ -45,7 +46,7 @@ nimble_python/resources/task_agent/__init__.py,sha256=Vn8OE0ZRaNggpFEbPoDnIKo5tr
45
46
  nimble_python/resources/task_agent/runs.py,sha256=_of_Ydc_Kenuab2A403Cx875h9jAVqgVl5WEizqBMjE,21425
46
47
  nimble_python/resources/task_agent/task_agent.py,sha256=JHwrJcxypOEsIouhVmA-HvRAZqWKVbJZG2sWLmGOEjQ,29987
47
48
  nimble_python/resources/task_agent/templates.py,sha256=WCVDL7cHs9wuvgiQImhoplyEw4eq2LGWz4T-WeKxWQw,10170
48
- nimble_python/types/__init__.py,sha256=SPJqbV50JMTQynGhAFFycL6n1nTKDCKpqKvhiJRcQm8,5425
49
+ nimble_python/types/__init__.py,sha256=bQVFqX-OAp6wcQkPwnsjLdYOyaUxV_kcc4ptxs2ml7o,5577
49
50
  nimble_python/types/agent_generate_params.py,sha256=IBnmlBaruvVugX6e3wVtu8tEnfh5ZqXPLgnqTnI4LKs,1085
50
51
  nimble_python/types/agent_generate_response.py,sha256=4yQ4mhR6MiQMiIWCdzIUCB4zFZJXQspBrQvbka3sOw4,1480
51
52
  nimble_python/types/agent_get_generation_response.py,sha256=299Pc6c0IJMdjZ2loKw9y-MqfuGzS6MddMcIAx9cd_8,1490
@@ -76,6 +77,8 @@ nimble_python/types/domain_knowledge_get_driver_response.py,sha256=LbQLAXrwO2KHo
76
77
  nimble_python/types/extract_async_response.py,sha256=B8COYO0Aou7_1eAs1Hk42QHdgm4Nqq5BemiQqVnv4N0,1799
77
78
  nimble_python/types/extract_batch_response.py,sha256=f48Dq32SnwnN2jBZxyCTBTiXLB7Fl0jgFVW2U051mVk,1787
78
79
  nimble_python/types/extract_response.py,sha256=67CkH4vOsZTUvGOWEMLANPBK_d2hgDcqlmEB_B3LhMk,8245
80
+ nimble_python/types/fast_serp_run_params.py,sha256=iN_ndjEkUnld4TOggVSrnc9UR7jtCvohenD6zXE7Tq0,1709
81
+ nimble_python/types/fast_serp_run_response.py,sha256=QaScD_aRW4txdYVATauXICPD7T4QxcsIWclIs2XV2zM,8253
79
82
  nimble_python/types/job_create_params.py,sha256=Ep5MGCGt5-whjBmYK5kVzy7Hu1SPcZlqTjEKfq6cVB8,993
80
83
  nimble_python/types/job_create_response.py,sha256=9BkYs0M_93BF9cxDKhs1-el-ol8WtLtsRmRd3lWR4Bc,1240
81
84
  nimble_python/types/job_get_response.py,sha256=E8YjA3EszHztJ7CzHKR1JkVbxhnUjvKBcX3AoJYpDMA,1234
@@ -155,7 +158,7 @@ nimble_python/types/task_agent/run_list_response.py,sha256=ukjowSnTanzUOzOfoXBEd
155
158
  nimble_python/types/task_agent/template_get_response.py,sha256=CNsbA1uNMYTfkEELIq5WPoAFAqvxfGFwGHf4IXPLCaw,1007
156
159
  nimble_python/types/task_agent/template_list_params.py,sha256=9zRXI2fd24e7aPqz4tnH5dscMxqhdDogWW-qHe8AVaA,365
157
160
  nimble_python/types/task_agent/template_list_response.py,sha256=LtH39vwXZU6hXWISP31mTyU0xMgBLN3QaECYBTdIKOE,1358
158
- nimble_python-0.20.0.dist-info/METADATA,sha256=wBTEnrD7UXKAt5fwZBJH5ECrrn4vfdmzKbLEFRm7Y7c,15816
159
- nimble_python-0.20.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
160
- nimble_python-0.20.0.dist-info/licenses/LICENSE,sha256=khtIpaYdgNbXXcmzsxlSL_iKmh160uTREZTiMQKCB24,11336
161
- nimble_python-0.20.0.dist-info/RECORD,,
161
+ nimble_python-0.21.0.dist-info/METADATA,sha256=GT7tOj-2Q4Sp8_MaFRu1EP0S0qpziZviucTq-AxZ_SQ,15816
162
+ nimble_python-0.21.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
163
+ nimble_python-0.21.0.dist-info/licenses/LICENSE,sha256=khtIpaYdgNbXXcmzsxlSL_iKmh160uTREZTiMQKCB24,11336
164
+ nimble_python-0.21.0.dist-info/RECORD,,