NOSIBLE Python SDK
The NOSIBLE Python SDK provides synchronous access to Search API v2.1 and the NOSIBLE World API from one client.
Installation
pip install "nosible==0.4.0"
Python 3.9 and newer are supported.
Authentication
Create an API key in the NOSIBLE application,
then set NOSIBLE_API_KEY:
$Env:NOSIBLE_API_KEY="nos_sk_..."
export NOSIBLE_API_KEY="nos_sk_..."
Search requests use the api-key header. Authenticated World requests use
Authorization: Bearer. World version is always credential-free. Search
Schema and Markdown delivery requests are public-first and retry once with
SDK-managed bearer authentication only when a deployment rejects anonymous
access and an API key is configured.
First Search
from nosible import Nosible
with Nosible() as client:
results = client.fast_search(
question="What is changing in semiconductor capacity?",
n_results=25
)
for result in results:
print(result.title, result.similarity)
First World query
from nosible import Nosible
with Nosible() as client:
dates = client.world.dates()
events = client.world.events(date=dates["dates"][0])
for event in events:
print(event.event_id, event.event.get("title"))
The combined endpoint documentation is available at docs.nosible.com.
API reference
|
High-level synchronous client for NOSIBLE Search and World. |
|
One losslessly represented Search result. |
|
Ordered, iterable collection of NOSIBLE Search results. |
|
One losslessly represented result from Rich Search. |
|
Parameters for a NOSIBLE Search request. |
|
Mutable iterator and collection of Search objects. |
|
Extracted and processed data for one web page. |
|
A lossless snippet returned by NOSIBLE Search. |
|
Mutable iterator and collection of snippets. |
|
Provide typed synchronous access to the NOSIBLE World API. |
|
A World v1.2 event or a compatible lite projection. |
|
Iterable World event page that retains all endpoint metadata. |