nosible 0.2.4__py3-none-any.whl → 0.2.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nosible
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Python client for the NOSIBLE Search API
5
5
  Home-page: https://github.com/NosibleAI/nosible
6
6
  Author: Stuart Reid, Matthew Dicks, Richard Taylor, Gareth Warburton
@@ -172,17 +172,16 @@ with Nosible(
172
172
  llm_api_key="sk-...",
173
173
  openai_base_url="https://api.openrouter.ai/v1"
174
174
  ) as client:
175
- results = client.search(
175
+ results = client.fast_search(
176
176
  question="What are the terms of the partnership between Microsoft and OpenAI?",
177
177
  n_results=20,
178
+ language="en",
178
179
  publish_start="2020-06-01",
179
180
  publish_end="2025-06-30",
180
- include_netlocs=["nytimes.com", "techcrunch.com"],
181
- exclude_netlocs=["example.com"],
182
181
  visited_start="2023-06-01",
183
182
  visited_end="2025-06-29",
184
- include_languages=["en", "fr"],
185
- exclude_languages=["de"],
183
+ include_netlocs=["nytimes.com", "techcrunch.com"],
184
+ exclude_netlocs=["example.com"],
186
185
  include_companies=["/m/04sv4"], # Microsoft's GKID
187
186
  exclude_companies=["/m/045c7b"] # Google GKID
188
187
  )
@@ -203,7 +202,7 @@ with Nosible(
203
202
  ```python
204
203
  # Example of using your own expansions
205
204
  with Nosible() as nos:
206
- results = nos.search(
205
+ results = nos.fast_search(
207
206
  question="How have the Trump tariffs impacted the US economy?",
208
207
  expansions=[
209
208
  "What are the consequences of Trump's 2018 steel and aluminum tariffs on American manufacturers?",
@@ -232,7 +231,7 @@ Allows you to run multiple searches concurrently and `yields` the results as the
232
231
  from nosible import Nosible
233
232
 
234
233
  with Nosible(nosible_api_key="basic|abcd1234...", llm_api_key="sk-...") as client:
235
- for batch in client.searches(
234
+ for batch in client.fast_searches(
236
235
  questions=[
237
236
  "What are the terms of the partnership between Microsoft and OpenAI?",
238
237
  "What exclusivity or non-compete clauses are included in their partnership?"
@@ -249,7 +248,7 @@ Bulk search enables you to retrieve a large number of results in a single reques
249
248
 
250
249
  - Use the `bulk_search` method when you need more than 1,000 results for a single query.
251
250
  - You can request between **1,000 and 10,000** results per query.
252
- - All parameters available in the standard `search` method—such as `expansions`, `include_companies`, `include_languages`, and more—are also supported in `bulk_search`.
251
+ - All parameters available in the standard `search` method—such as `expansions`, `include_companies`, and more—are also supported in `bulk_search`.
253
252
  - A bulk search for 10,000 results typically completes in about 30 seconds or less.
254
253
 
255
254
  ```python
@@ -272,11 +271,11 @@ Add two ResultSets together:
272
271
  from nosible import Nosible
273
272
 
274
273
  with Nosible(nosible_api_key="basic|abcd1234...") as client:
275
- r1 = client.search(
274
+ r1 = client.fast_search(
276
275
  question="What are the terms of the partnership between Microsoft and OpenAI?",
277
276
  n_results=5
278
277
  )
279
- r2 = client.search(
278
+ r2 = client.fast_search(
280
279
  question="How is research governance and decision-making structured between Google and DeepMind?",
281
280
  n_results=5
282
281
  )
@@ -300,7 +299,7 @@ with Nosible(nosible_api_key="basic|abcd1234...") as client:
300
299
  include_netlocs=["arxiv.org", "bbc.com"],
301
300
  certain=True
302
301
  )
303
- results = client.search(search=search)
302
+ results = client.fast_search(search=search)
304
303
  print([r for r in results])
305
304
  ```
306
305
 
@@ -317,7 +316,7 @@ This fetches a sentiment score for each search result.
317
316
  from nosible import Nosible
318
317
 
319
318
  with Nosible(nosible_api_key="basic|abcd1234...", llm_api_key="sk-...") as client:
320
- results = client.search(
319
+ results = client.fast_search(
321
320
  question="What are the terms of the partnership between Microsoft and OpenAI?",
322
321
  n_results=1
323
322
  )
@@ -333,29 +332,29 @@ Supported formats for saving and loading:
333
332
  from nosible import Nosible, ResultSet
334
333
 
335
334
  with Nosible(nosible_api_key="basic|abcd1234...") as client:
336
- combined = client.search(
337
- question="What are the terms of the partnership between Microsoft and OpenAI?",
338
- n_results=5
339
- ) + client.search(
340
- question="How is research governance and decision-making structured between Google and DeepMind?",
341
- n_results=5
342
- )
343
-
344
- # Save
345
- combined.to_csv("all_news.csv")
346
- combined.to_json("all_news.json")
347
- combined.to_parquet("all_news.parquet")
348
- combined.to_arrow("all_news.arrow")
349
- combined.to_duckdb("all_news.duckdb", table_name="news")
350
- combined.to_ndjson("all_news.ndjson")
351
-
352
- # Load
353
- rs_csv = ResultSet.from_csv("all_news.csv")
354
- rs_json = ResultSet.from_json("all_news.json")
355
- rs_parq = ResultSet.from_parquet("all_news.parquet")
356
- rs_arrow = ResultSet.from_arrow("all_news.arrow")
357
- rs_duckdb = ResultSet.from_duckdb("all_news.duckdb")
358
- rs_ndjson = ResultSet.from_ndjson("all_news.ndjson")
335
+ combined = client.fast_search(
336
+ question="What are the terms of the partnership between Microsoft and OpenAI?",
337
+ n_results=5
338
+ ) + client.fast_search(
339
+ question="How is research governance and decision-making structured between Google and DeepMind?",
340
+ n_results=5
341
+ )
342
+
343
+ # Save
344
+ combined.write_csv("all_news.csv")
345
+ combined.write_json("all_news.json")
346
+ combined.write_parquet("all_news.parquet")
347
+ combined.write_ipc("all_news.arrow")
348
+ combined.write_duckdb("all_news.duckdb", table_name="news")
349
+ combined.write_ndjson("all_news.ndjson")
350
+
351
+ # Load
352
+ rs_csv = ResultSet.read_csv("all_news.csv")
353
+ rs_json = ResultSet.read_json("all_news.json")
354
+ rs_parq = ResultSet.read_parquet("all_news.parquet")
355
+ rs_arrow = ResultSet.read_ipc("all_news.arrow")
356
+ rs_duckdb = ResultSet.read_duckdb("all_news.duckdb")
357
+ rs_ndjson = ResultSet.read_ndjson("all_news.ndjson")
359
358
  ```
360
359
 
361
360
  #### More Examples
@@ -0,0 +1,16 @@
1
+ nosible/__init__.py,sha256=11QmG9Wjprp_zB0VnPxGjqKwHmaoB0hoT8AGO6cGVMM,1426
2
+ nosible/nosible_client.py,sha256=2JB_ns5EMkgNDUBhKPNXeKC3P4MllK0RYrJ8eLp9NTQ,93674
3
+ nosible/classes/result.py,sha256=80SKBcJRQj091DwNEnNE9LP-KgDN38qKVjA5CRd-8Ro,22598
4
+ nosible/classes/result_set.py,sha256=uQ9oeD2nqYTE1dGetkhkfqmPmuvxmRyVILfeHxSkT1E,53138
5
+ nosible/classes/search.py,sha256=Ve0M2EbQRFi6zzV_BDqA8tV7AgglztwqV8i2L4sepEI,13664
6
+ nosible/classes/search_set.py,sha256=VvtKXQ1_Ws_W-0p0C-wUvvdskeuXAyr65tpfvexAVw0,9895
7
+ nosible/classes/snippet.py,sha256=m2qxgnMxIxx4ZOIMqUAViGLf7C1Y4NCGaioyEKw2-Zg,4994
8
+ nosible/classes/snippet_set.py,sha256=0jPMDhJNCO02WhvY1QR1HedvADvBxRcN6x3FItEgSiI,5099
9
+ nosible/classes/web_page.py,sha256=cvwQspxS0pU2nFgPLqnDtDWlLONHp1KwxerflHueLJ8,5838
10
+ nosible/utils/json_tools.py,sha256=PcSMjcLEhbA626jAIn0SuD_1-4QDduapZUenTSt3N2E,4569
11
+ nosible/utils/rate_limiter.py,sha256=qr0Tg-3wVcw95FyQv3gbZhbf-_QY9zKdkIE4FSLFSBo,5400
12
+ nosible-0.2.5.dist-info/licenses/LICENSE,sha256=8ifsV4DrsiKi8KVBFy8SBb3KXPXhofE3pYq07q1TSCQ,1117
13
+ nosible-0.2.5.dist-info/METADATA,sha256=UrYxqEQed_qul9Uj3PVgPnukuNid-rKrUX-hQnQ07l4,14786
14
+ nosible-0.2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ nosible-0.2.5.dist-info/top_level.txt,sha256=mOconHuKcNJ1jTAj3DapQP_xB8YOmjTMyHg5txKH3uA,8
16
+ nosible-0.2.5.dist-info/RECORD,,
@@ -1,16 +0,0 @@
1
- nosible/__init__.py,sha256=11QmG9Wjprp_zB0VnPxGjqKwHmaoB0hoT8AGO6cGVMM,1426
2
- nosible/nosible_client.py,sha256=KgkdUofTNeARvHmL3hquPIgPtVHnNhiplBpMkPJYrrY,82214
3
- nosible/classes/result.py,sha256=JQEmJqy48cvEnT2gchIf3HhyGY1ICDfb4xplWfDoVrY,17652
4
- nosible/classes/result_set.py,sha256=badc0q8rlvgUQ36ZrNgSY5O40lIvyZsCChtpnoCM5jk,52813
5
- nosible/classes/search.py,sha256=_RDH8ih75RufztOG7NUJuZ1ncNV3jNThq8ST41VP0fU,11269
6
- nosible/classes/search_set.py,sha256=4L2qO_IKqlUebvxNJERxjXNiUKtolw7JhgFtt1QqEHk,9790
7
- nosible/classes/snippet.py,sha256=5Av0cXjOL-8X6H8oFunC36DUyWiFLLsl7FfPJ7cYwVU,4988
8
- nosible/classes/snippet_set.py,sha256=1SZUEq6zRcBT3N8BKbFPml5pt_WSCybIjMpTw8PTz4E,5093
9
- nosible/classes/web_page.py,sha256=fe-cfDL-AmQRMdBO37jWh1K6BsH_K_VWBBfBzFRV3KM,7149
10
- nosible/utils/json_tools.py,sha256=PcSMjcLEhbA626jAIn0SuD_1-4QDduapZUenTSt3N2E,4569
11
- nosible/utils/rate_limiter.py,sha256=qr0Tg-3wVcw95FyQv3gbZhbf-_QY9zKdkIE4FSLFSBo,5400
12
- nosible-0.2.4.dist-info/licenses/LICENSE,sha256=8ifsV4DrsiKi8KVBFy8SBb3KXPXhofE3pYq07q1TSCQ,1117
13
- nosible-0.2.4.dist-info/METADATA,sha256=zQh03i9LjKKddVkV5z-yuJdcq1MB-4AAVpywgMmv00M,14857
14
- nosible-0.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- nosible-0.2.4.dist-info/top_level.txt,sha256=mOconHuKcNJ1jTAj3DapQP_xB8YOmjTMyHg5txKH3uA,8
16
- nosible-0.2.4.dist-info/RECORD,,