nosible 0.3.10__py3-none-any.whl → 0.3.12__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.
nosible/nosible_client.py CHANGED
@@ -1725,7 +1725,28 @@ class Nosible:
1725
1725
 
1726
1726
  def _get_limits(self) -> dict[str, list[tuple[int, float]]]:
1727
1727
  """
1728
- TODO
1728
+ Fetch and parse the current API rate limits from the Nosible service.
1729
+
1730
+ Returns
1731
+ -------
1732
+ dict[str, list[tuple[int, float]]]
1733
+ A dictionary mapping query types (e.g., 'fast', 'slow', 'visit') to a list
1734
+ of limit buckets. Each bucket is a tuple containing:
1735
+ - limit (int): The maximum number of requests allowed.
1736
+ - duration_seconds (float): The time window for the limit.
1737
+
1738
+ Raises
1739
+ ------
1740
+ ValueError
1741
+ If the API key is invalid (401).
1742
+ ValueError
1743
+ If the rate limit is hit (429).
1744
+ ValueError
1745
+ If there are too many concurrent searches (409).
1746
+ ValueError
1747
+ If the service is restarting (502) or overloaded (504).
1748
+ ValueError
1749
+ If the response JSON is invalid or missing required fields.
1729
1750
  """
1730
1751
  url = "https://www.nosible.ai/search/v2/limits"
1731
1752
  resp = self._session.get(
@@ -2122,7 +2143,7 @@ class Nosible:
2122
2143
  "certain",
2123
2144
  "netloc",
2124
2145
  "language",
2125
- "companies"
2146
+ "companies",
2126
2147
  "doc",
2127
2148
  ]
2128
2149
  import polars as pl # Lazy import
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nosible
3
- Version: 0.3.10
3
+ Version: 0.3.12
4
4
  Summary: Python client for the NOSIBLE Search API
5
5
  Home-page: https://github.com/NosibleAI/nosible-py
6
6
  Author: Stuart Reid, Matthew Dicks, Richard Taylor, Gareth Warburton
@@ -27,15 +27,16 @@ Classifier: Operating System :: OS Independent
27
27
  Requires-Python: >=3.9
28
28
  Description-Content-Type: text/markdown
29
29
  License-File: LICENSE
30
- Requires-Dist: polars
31
- Requires-Dist: duckdb
32
- Requires-Dist: openai
33
- Requires-Dist: tantivy
34
- Requires-Dist: pyrate-limiter<4
35
- Requires-Dist: tenacity
36
- Requires-Dist: cryptography
37
- Requires-Dist: pyarrow
38
- Requires-Dist: pandas
30
+ Requires-Dist: httpx<0.28.0,>=0.25.0
31
+ Requires-Dist: openai>=1.3.0
32
+ Requires-Dist: tenacity>=8.2.0
33
+ Requires-Dist: pyrate-limiter<4,>=3.1.0
34
+ Requires-Dist: cryptography>=41.0.0
35
+ Requires-Dist: polars>=0.20.0
36
+ Requires-Dist: duckdb>=0.9.2
37
+ Requires-Dist: pyarrow>=14.0.0
38
+ Requires-Dist: pandas>=2.0.0
39
+ Requires-Dist: tantivy>=0.21.0
39
40
  Dynamic: author
40
41
  Dynamic: home-page
41
42
  Dynamic: license-file
@@ -91,19 +92,19 @@ uv pip install nosible
91
92
 
92
93
  ### 🔑 Authentication
93
94
 
94
- 1. Sign in to [NOSIBLE.AI](https://www.nosible.ai/) and grab your free API key.
95
+ 1. Sign in to [NOSIBLE.COM](https://nosible.com/) and grab your free API key.
95
96
  2. Set it as an environment variable or pass directly:
96
97
 
97
98
  On Windows
98
99
 
99
100
  ```powershell
100
- $Env:NOSIBLE_API_KEY="basic|abcd1234..."
101
+ $Env:NOSIBLE_API_KEY="nos_sk_..."
101
102
  $Env:LLM_API_KEY="sk-..." # for query expansions (optional)
102
103
  ```
103
104
 
104
105
  On Linux
105
106
  ```bash
106
- export NOSIBLE_API_KEY="basic|abcd1234..."
107
+ export NOSIBLE_API_KEY="nos_sk_..."
107
108
  export LLM_API_KEY="sk-..." # for query expansions (optional)
108
109
  ```
109
110
 
@@ -115,7 +116,7 @@ Or in code:
115
116
  from nosible import Nosible
116
117
 
117
118
  client = Nosible(
118
- nosible_api_key="basic|abcd1234...",
119
+ nosible_api_key="nos_sk_...",
119
120
  llm_api_key="sk-...",
120
121
  )
121
122
  ```
@@ -126,7 +127,7 @@ client = Nosible(
126
127
  from nosible import Nosible
127
128
  import os
128
129
 
129
- os.environ["NOSIBLE_API_KEY"] = "basic|abcd1234..."
130
+ os.environ["NOSIBLE_API_KEY"] = "nos_sk_..."
130
131
  os.environ["LLM_API_KEY"] = "sk-..."
131
132
  ```
132
133
 
@@ -177,7 +178,7 @@ You can find online endpoints to the NOSIBLE Search API Swagger Docs
177
178
 
178
179
  ---
179
180
 
180
- © 2025 Nosible Inc. | [Privacy Policy](https://www.nosible.ai/privacy) | [Terms](https://www.nosible.ai/terms)
181
+ © 2026 Nosible Inc. | [Privacy Policy](https://www.nosible.ai/privacy) | [Terms](https://www.nosible.ai/terms)
181
182
 
182
183
 
183
184
  [nosible-badge]: https://img.shields.io/static/v1?label=Visit&message=nosible.ai&\style=flat&logoUri=https://raw.githubusercontent.com/NosibleAI/nosible-py/main/docs/_static/favicon.png&logoWidth=20
@@ -1,5 +1,5 @@
1
1
  nosible/__init__.py,sha256=11QmG9Wjprp_zB0VnPxGjqKwHmaoB0hoT8AGO6cGVMM,1426
2
- nosible/nosible_client.py,sha256=nq9WKGVCyarG5-3vXZOT67vLfGq7rlSEOBbqfLZpEE0,89644
2
+ nosible/nosible_client.py,sha256=UEBg6pbMPiu2Q9t9Hg7Aqb9oNsXMrs2PA6TFymWTMsA,90492
3
3
  nosible/classes/result.py,sha256=DvUUt4hiZ8PJBGTIwkq5GFB4ors_2L9dApNlawSLesA,22978
4
4
  nosible/classes/result_set.py,sha256=9xuACJVp5n3pKECBjhkzNMb7PAQd4P1HmtkZH3KFAyo,52911
5
5
  nosible/classes/search.py,sha256=VrpuAsS4pxcirR6l6WStJN0gPIfahZ_9Cx3YdNKczSw,13860
@@ -9,8 +9,8 @@ nosible/classes/snippet_set.py,sha256=0jPMDhJNCO02WhvY1QR1HedvADvBxRcN6x3FItEgSi
9
9
  nosible/classes/web_page.py,sha256=gAOBnqaK59f5erdRERxhvKmcwRVSXvhwJwyHIjPyeek,5732
10
10
  nosible/utils/json_tools.py,sha256=PcSMjcLEhbA626jAIn0SuD_1-4QDduapZUenTSt3N2E,4569
11
11
  nosible/utils/rate_limiter.py,sha256=Io7OCU6MmGoPswYj6PivtSNkFdzLaeam3tf29F5XeUQ,3980
12
- nosible-0.3.10.dist-info/licenses/LICENSE,sha256=8ifsV4DrsiKi8KVBFy8SBb3KXPXhofE3pYq07q1TSCQ,1117
13
- nosible-0.3.10.dist-info/METADATA,sha256=oWvzqQvtmgzhcaxIQ0APzsqoE_PSuSzVT_RWTYk5tQ8,6035
14
- nosible-0.3.10.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
15
- nosible-0.3.10.dist-info/top_level.txt,sha256=mOconHuKcNJ1jTAj3DapQP_xB8YOmjTMyHg5txKH3uA,8
16
- nosible-0.3.10.dist-info/RECORD,,
12
+ nosible-0.3.12.dist-info/licenses/LICENSE,sha256=zQ24t7SsjwlufC47jkzwteGul0pSQJQFsjPMhEI1-Ps,1117
13
+ nosible-0.3.12.dist-info/METADATA,sha256=dZc_O0rcgFqeLpsl0FPvdg9A4EkMUsudKjtmva_eUAU,6110
14
+ nosible-0.3.12.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
15
+ nosible-0.3.12.dist-info/top_level.txt,sha256=mOconHuKcNJ1jTAj3DapQP_xB8YOmjTMyHg5txKH3uA,8
16
+ nosible-0.3.12.dist-info/RECORD,,
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Stuart Reid, Matthew Dicks, Richard Taylor, Gareth Warburton
3
+ Copyright (c) 2026 Stuart Reid, Matthew Dicks, Richard Taylor, Gareth Warburton
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal