Metadata-Version: 2.4
Name: nela-sdk
Version: 0.1.0
Summary: NELA cloud client for chat, reasoning, presentations, spreadsheets, and web search
License-Expression: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: python-pptx>=1.0.2
Requires-Dist: openpyxl>=3.1.5
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"

# nela-sdk

Python client for NELA Cloud. Chat, optional model reasoning, web search, PowerPoint, and Excel.

```sh
pip install nela-sdk
```

Create a key while signed in to NELA (`POST /v1/sdk/keys` with your account access token). The secret starts with `nela_` and is shown once. It spends the same credits as that account.

```python
import os
from nela import Nela

nela = Nela(os.environ["NELA_API_KEY"], os.environ["NELA_BASE_URL"])

answer = nela.complete(
    [{"role": "user", "content": "Explain this month's cash movement in one paragraph."}],
    mode="smart",
    reasoning=True,
)
print(answer["text"])
print(answer["reasoning"])

deck = nela.create_presentation(
    "A 6-slide board update on cash, sales, and overdue invoices.",
    "board.pptx",
    reasoning=True,
)

book = nela.create_spreadsheet(
    "A monthly P&L with headers Month, Revenue, Expenses, Profit and three sample rows.",
    "pnl.xlsx",
)

search = nela.search("GST due dates India", profile="simple")
```

`reasoning=True` sends `includeReasoning` and, unless you set `intent`, uses `deep_reasoning`. `nela.stream(...)` yields `text`, `reasoning`, and a final `done` event.

`mode` is `fast`, `smart`, `deep`, or `auto`. Other cloud intents (`summarize`, `vision`, `artifact_plan`, `rag_answer`) can be passed to `complete` and `stream`.

Desktop-only features (on-device models, the Tally connector, and the local file indexer) are not in this package. Presentations and spreadsheets are files this SDK writes on your machine from a cloud JSON plan. Set `base_url` or `NELA_BASE_URL` to the API origin.
