nosible 0.2.5__tar.gz → 0.2.7__tar.gz

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 (26) hide show
  1. {nosible-0.2.5/src/nosible.egg-info → nosible-0.2.7}/PKG-INFO +6 -6
  2. {nosible-0.2.5 → nosible-0.2.7}/README.md +5 -5
  3. {nosible-0.2.5 → nosible-0.2.7}/pyproject.toml +1 -1
  4. {nosible-0.2.5 → nosible-0.2.7}/src/nosible/classes/result.py +4 -0
  5. {nosible-0.2.5 → nosible-0.2.7}/src/nosible/classes/search.py +5 -0
  6. {nosible-0.2.5 → nosible-0.2.7}/src/nosible/nosible_client.py +20 -1
  7. {nosible-0.2.5 → nosible-0.2.7/src/nosible.egg-info}/PKG-INFO +6 -6
  8. {nosible-0.2.5 → nosible-0.2.7}/LICENSE +0 -0
  9. {nosible-0.2.5 → nosible-0.2.7}/setup.cfg +0 -0
  10. {nosible-0.2.5 → nosible-0.2.7}/setup.py +0 -0
  11. {nosible-0.2.5 → nosible-0.2.7}/src/nosible/__init__.py +0 -0
  12. {nosible-0.2.5 → nosible-0.2.7}/src/nosible/classes/result_set.py +0 -0
  13. {nosible-0.2.5 → nosible-0.2.7}/src/nosible/classes/search_set.py +0 -0
  14. {nosible-0.2.5 → nosible-0.2.7}/src/nosible/classes/snippet.py +0 -0
  15. {nosible-0.2.5 → nosible-0.2.7}/src/nosible/classes/snippet_set.py +0 -0
  16. {nosible-0.2.5 → nosible-0.2.7}/src/nosible/classes/web_page.py +0 -0
  17. {nosible-0.2.5 → nosible-0.2.7}/src/nosible/utils/json_tools.py +0 -0
  18. {nosible-0.2.5 → nosible-0.2.7}/src/nosible/utils/rate_limiter.py +0 -0
  19. {nosible-0.2.5 → nosible-0.2.7}/src/nosible.egg-info/SOURCES.txt +0 -0
  20. {nosible-0.2.5 → nosible-0.2.7}/src/nosible.egg-info/dependency_links.txt +0 -0
  21. {nosible-0.2.5 → nosible-0.2.7}/src/nosible.egg-info/requires.txt +0 -0
  22. {nosible-0.2.5 → nosible-0.2.7}/src/nosible.egg-info/top_level.txt +0 -0
  23. {nosible-0.2.5 → nosible-0.2.7}/tests/test_01_nosible.py +0 -0
  24. {nosible-0.2.5 → nosible-0.2.7}/tests/test_02_results.py +0 -0
  25. {nosible-0.2.5 → nosible-0.2.7}/tests/test_03_search_searchset.py +0 -0
  26. {nosible-0.2.5 → nosible-0.2.7}/tests/test_04_snippets.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nosible
3
- Version: 0.2.5
3
+ Version: 0.2.7
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
@@ -132,11 +132,11 @@ os.environ["LLM_API_KEY"] = "sk-..."
132
132
 
133
133
  ### 🎯 Core Workflows
134
134
 
135
- | I need | Method | Use case |
136
- |---------------------------------|---------------|-------------------------|
137
- | Single query, up to 100 results | `search` | Interactive lookups |
138
- | Multiple queries in parallel | `searches` | Dashboards, comparisons |
139
- | Thousands of results (100–10k) | `bulk_search` | Analytics, offline jobs |
135
+ | I need | Method | Use case |
136
+ |---------------------------------|-----------------|-------------------------|
137
+ | Single query, up to 100 results | `fast-search` | Interactive lookups |
138
+ | Multiple queries in parallel | `fast-searches` | Dashboards, comparisons |
139
+ | Thousands of results (100–10k) | `bulk_search` | Analytics, offline jobs |
140
140
 
141
141
 
142
142
  ### 🚀 Examples
@@ -89,11 +89,11 @@ os.environ["LLM_API_KEY"] = "sk-..."
89
89
 
90
90
  ### 🎯 Core Workflows
91
91
 
92
- | I need | Method | Use case |
93
- |---------------------------------|---------------|-------------------------|
94
- | Single query, up to 100 results | `search` | Interactive lookups |
95
- | Multiple queries in parallel | `searches` | Dashboards, comparisons |
96
- | Thousands of results (100–10k) | `bulk_search` | Analytics, offline jobs |
92
+ | I need | Method | Use case |
93
+ |---------------------------------|-----------------|-------------------------|
94
+ | Single query, up to 100 results | `fast-search` | Interactive lookups |
95
+ | Multiple queries in parallel | `fast-searches` | Dashboards, comparisons |
96
+ | Thousands of results (100–10k) | `bulk_search` | Analytics, offline jobs |
97
97
 
98
98
 
99
99
  ### 🚀 Examples
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nosible"
3
- version = "0.2.5"
3
+ version = "0.2.7"
4
4
  description = "Python client for the NOSIBLE Search API"
5
5
  readme = { file = "README.md", content-type = "text/markdown" }
6
6
  requires-python = ">=3.9"
@@ -408,6 +408,7 @@ class Result:
408
408
  iab_tier_2: str = None,
409
409
  iab_tier_3: str = None,
410
410
  iab_tier_4: str = None,
411
+ instruction: str = None,
411
412
  *args, **kwargs
412
413
  ) -> ResultSet:
413
414
  """
@@ -478,6 +479,8 @@ class Result:
478
479
  IAB Tier 3 category for the content.
479
480
  iab_tier_4 : str, optional
480
481
  IAB Tier 4 category for the content.
482
+ instruction : str, optional
483
+ Instruction to use with the search query.
481
484
 
482
485
  Returns
483
486
  -------
@@ -549,6 +552,7 @@ class Result:
549
552
  iab_tier_2=iab_tier_2,
550
553
  iab_tier_3=iab_tier_3,
551
554
  iab_tier_4=iab_tier_4,
555
+ instruction=instruction,
552
556
  )
553
557
  return client.fast_search(search=s)
554
558
  except Exception as e:
@@ -89,6 +89,8 @@ class Search:
89
89
  IAB Tier 3 category for the content.
90
90
  iab_tier_4 : str, optional
91
91
  IAB Tier 4 category for the content.
92
+ instruction : str, optional
93
+ Instruction to use with the search query.
92
94
 
93
95
  Examples
94
96
  --------
@@ -176,6 +178,8 @@ class Search:
176
178
  """IAB Tier 3 category for the content."""
177
179
  iab_tier_4: str | None = None
178
180
  """IAB Tier 4 category for the content."""
181
+ instruction: str | None = None
182
+ """Instruction to use with the search query."""
179
183
 
180
184
  _FIELDS = [
181
185
  "question",
@@ -213,6 +217,7 @@ class Search:
213
217
  "iab_tier_2",
214
218
  "iab_tier_3",
215
219
  "iab_tier_4",
220
+ "instruction",
216
221
  ]
217
222
 
218
223
  def __str__(self) -> str:
@@ -108,6 +108,8 @@ class Nosible:
108
108
  IAB Tier 3 category for the content.
109
109
  iab_tier_4 : str, optional
110
110
  IAB Tier 4 category for the content.
111
+ instruction : str, optional
112
+ Instruction to use with the search query.
111
113
 
112
114
  Notes
113
115
  -----
@@ -159,6 +161,7 @@ class Nosible:
159
161
  iab_tier_2: str = None,
160
162
  iab_tier_3: str = None,
161
163
  iab_tier_4: str = None,
164
+ instruction: str = None,
162
165
  *args, **kwargs
163
166
  ) -> None:
164
167
 
@@ -256,6 +259,7 @@ class Nosible:
256
259
  self.iab_tier_2 = iab_tier_2
257
260
  self.iab_tier_3 = iab_tier_3
258
261
  self.iab_tier_4 = iab_tier_4
262
+ self.instruction = instruction
259
263
 
260
264
  def fast_search(
261
265
  self,
@@ -295,6 +299,7 @@ class Nosible:
295
299
  iab_tier_2: str = None,
296
300
  iab_tier_3: str = None,
297
301
  iab_tier_4: str = None,
302
+ instruction: str = None,
298
303
  *args, **kwargs
299
304
  ) -> ResultSet:
300
305
  """
@@ -377,6 +382,8 @@ class Nosible:
377
382
  IAB Tier 3 category for the content.
378
383
  iab_tier_4 : str, optional
379
384
  IAB Tier 4 category for the content.
385
+ instruction : str, optional
386
+ Instruction to use with the search query.
380
387
 
381
388
  Returns
382
389
  -------
@@ -477,6 +484,7 @@ class Nosible:
477
484
  iab_tier_2=iab_tier_2,
478
485
  iab_tier_3=iab_tier_3,
479
486
  iab_tier_4=iab_tier_4,
487
+ instruction=instruction,
480
488
  )
481
489
 
482
490
  future = self._executor.submit(self._search_single, search_obj)
@@ -528,6 +536,7 @@ class Nosible:
528
536
  iab_tier_2: str = None,
529
537
  iab_tier_3: str = None,
530
538
  iab_tier_4: str = None,
539
+ instruction: str = None,
531
540
  **kwargs
532
541
  ) -> Iterator[ResultSet]:
533
542
  """
@@ -608,6 +617,8 @@ class Nosible:
608
617
  IAB Tier 3 category for the content.
609
618
  iab_tier_4 : str, optional
610
619
  IAB Tier 4 category for the content.
620
+ instruction : str, optional
621
+ Instruction to use with the search query.
611
622
 
612
623
  Returns
613
624
  ------
@@ -720,6 +731,7 @@ class Nosible:
720
731
  iab_tier_2=iab_tier_2,
721
732
  iab_tier_3=iab_tier_3,
722
733
  iab_tier_4=iab_tier_4,
734
+ instruction=instruction,
723
735
  )
724
736
 
725
737
  futures = [self._executor.submit(self._search_single, s) for s in searches_list]
@@ -811,6 +823,7 @@ class Nosible:
811
823
  iab_tier_2 = search_obj.iab_tier_2 if search_obj.iab_tier_2 is not None else self.iab_tier_2
812
824
  iab_tier_3 = search_obj.iab_tier_3 if search_obj.iab_tier_3 is not None else self.iab_tier_3
813
825
  iab_tier_4 = search_obj.iab_tier_4 if search_obj.iab_tier_4 is not None else self.iab_tier_4
826
+ instruction = search_obj.instruction if search_obj.instruction is not None else self.instruction
814
827
 
815
828
  must_include = must_include if must_include is not None else []
816
829
  must_exclude = must_exclude if must_exclude is not None else []
@@ -860,6 +873,7 @@ class Nosible:
860
873
  "must_exclude": must_exclude,
861
874
  }
862
875
  optional = {
876
+ "instruction": instruction,
863
877
  "brand_safety":brand_safety,
864
878
  "language": language,
865
879
  "continent": continent,
@@ -964,6 +978,7 @@ class Nosible:
964
978
  iab_tier_2: str = None,
965
979
  iab_tier_3: str = None,
966
980
  iab_tier_4: str = None,
981
+ instruction: str = None,
967
982
  verbose: bool = False,
968
983
  **kwargs,
969
984
  ) -> ResultSet:
@@ -1044,6 +1059,8 @@ class Nosible:
1044
1059
  IAB Tier 3 category for the content.
1045
1060
  iab_tier_4 : str, optional
1046
1061
  IAB Tier 4 category for the content.
1062
+ instruction : str, optional
1063
+ Instruction to use with the search query.
1047
1064
  verbose : bool, optional
1048
1065
  Show verbose output, Bulk search will print more information.
1049
1066
 
@@ -1173,6 +1190,7 @@ class Nosible:
1173
1190
  iab_tier_2 = search.iab_tier_2 if search.iab_tier_2 is not None else self.iab_tier_2
1174
1191
  iab_tier_3 = search.iab_tier_3 if search.iab_tier_3 is not None else self.iab_tier_3
1175
1192
  iab_tier_4 = search.iab_tier_4 if search.iab_tier_4 is not None else self.iab_tier_4
1193
+ instruction = search.instruction if search.instruction is not None else self.instruction
1176
1194
 
1177
1195
  # Default expansions and filters
1178
1196
  if expansions is None:
@@ -1234,6 +1252,7 @@ class Nosible:
1234
1252
  "must_exclude": must_exclude,
1235
1253
  }
1236
1254
  optional = {
1255
+ "instruction": instruction,
1237
1256
  "brand_safety": brand_safety,
1238
1257
  "language": language,
1239
1258
  "continent": continent,
@@ -1878,7 +1897,7 @@ class Nosible:
1878
1897
  prefix = (self.nosible_api_key or "").split("|", 1)[0]
1879
1898
 
1880
1899
  # Map prefixes -> plan names
1881
- plans = {"test", "basic", "pro", "pro+", "bus", "bus+", "ent", "chat"}
1900
+ plans = {"test", "basic", "pro", "pro+", "bus", "bus+", "ent", "chat", "cons", "stup", "busn"}
1882
1901
 
1883
1902
  if prefix not in plans:
1884
1903
  raise ValueError(f"Your API key is not valid: {prefix} is not a valid plan prefix.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nosible
3
- Version: 0.2.5
3
+ Version: 0.2.7
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
@@ -132,11 +132,11 @@ os.environ["LLM_API_KEY"] = "sk-..."
132
132
 
133
133
  ### 🎯 Core Workflows
134
134
 
135
- | I need | Method | Use case |
136
- |---------------------------------|---------------|-------------------------|
137
- | Single query, up to 100 results | `search` | Interactive lookups |
138
- | Multiple queries in parallel | `searches` | Dashboards, comparisons |
139
- | Thousands of results (100–10k) | `bulk_search` | Analytics, offline jobs |
135
+ | I need | Method | Use case |
136
+ |---------------------------------|-----------------|-------------------------|
137
+ | Single query, up to 100 results | `fast-search` | Interactive lookups |
138
+ | Multiple queries in parallel | `fast-searches` | Dashboards, comparisons |
139
+ | Thousands of results (100–10k) | `bulk_search` | Analytics, offline jobs |
140
140
 
141
141
 
142
142
  ### 🚀 Examples
File without changes
File without changes
File without changes
File without changes