Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions documentation/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
title: Configuration
---

Env vars:
This guide helps you configure the Text2Everything SDK using environment variables or direct parameters.

## Environment variables
Define your API endpoint and credentials as environment variables so they can be reused safely across shells and scripts.
```bash
export TEXT2EVERYTHING_BASE_URL="https://your-api-endpoint.com"
export TEXT2EVERYTHING_API_KEY="your-api-key"
```

Using env vars:
## Basic client initialization (env vars)
Create a client by reading values from the environment variables defined above.
```python
import os
from text2everything_sdk import Text2EverythingClient
Expand All @@ -19,7 +23,8 @@ client = Text2EverythingClient(
)
```

Advanced:
## Advanced options
Tune timeouts and retries to match your network conditions and request profiles.
```python
client = Text2EverythingClient(
base_url="https://...",
Expand All @@ -30,12 +35,11 @@ client = Text2EverythingClient(
)
```

Context manager:
## Context manager usage
Use the client as a context manager to ensure connections are closed and resources cleaned up automatically.
```python
from text2everything_sdk import Text2EverythingClient

with Text2EverythingClient(base_url="...", api_key="...") as client:
projects = client.projects.list()
```


```
33 changes: 30 additions & 3 deletions documentation/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,46 @@
title: Installation
---

For now, install locally:
This guide helps you install the **Python SDK for Text2Everything** in a clean environment, verify the installation, and find common fixes.

## Prerequisites
**Python 3.9+**: The SDK targets CPython 3.9 or newer.

## Install options
Choose one of the supported methods to install the SDK.

### Step 1: Local wheel (current builds)
Install from the wheel bundled with this repository or your build pipeline.
```bash
pip install dist/text2everything_sdk-0.1.2-py3-none-any.whl
```

Future (PyPI):
### Step 2: Using PyPI (Future)
```bash
pip install text2everything-sdk
```

Troubleshooting:
> Tip: Use a virtual environment (for example, `python -m venv .venv && source .venv/bin/activate`) to isolate dependencies.

## Verify installation
Run this snippet to confirm the package is importable and report its version.
```python
import text2everything_sdk as t2e
print(t2e.__version__)
```

If a version prints without error, the SDK is installed correctly.

## Next steps
After installing, configure the client and try a minimal working example.
- Configure authentication and timeouts in [Configuration](./configuration.md)
- Run your first example in [Quickstart](./quickstart.md)

## Troubleshooting
Use these common fixes if installation or imports fail.
- Ensure Python 3.9+
- If behind a proxy, set `HTTP_PROXY`/`HTTPS_PROXY`
- If using an internal package index, set `PIP_INDEX_URL`
- If `pip` fails TLS/SSL checks, update `certifi` or your OS trust store


30 changes: 20 additions & 10 deletions documentation/docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,26 @@
title: Quickstart
---

This Quickstart gets you from zero to a generated SQL query in ~5 minutes.
This quickstart guide helps you generate your first SQL query using the **Text2Everything** Python SDK.

Prereqs:
- Have a Text2Everything API endpoint and API key
- Python 3.9+
This page is for developers who want a fast, working example. You will install the SDK, create minimal project data, and ask a question that the SDK converts to SQL.

## Installation
Estimated time: 5 minutes.

## Prerequisites
- **Python 3.9+:** The SDK targets CPython 3.9 or newer; earlier versions are unsupported.
- **Text2Everything API endpoint and API key:** You need network access to your API deployment and a valid key to authenticate requests.

## Step 1: Install the SDK
Use the prebuilt wheel or see [Installation](./installation.md) for detailed steps.

```bash
pip install text2everything_sdk-0.1.x-py3-none-any.whl
```

## Minimal setup and first query
## Step 2: Minimal setup and first query
In this step you will create a project, add the smallest useful context and schema, provide one golden example, start a chat session, and ask a question that the SDK converts into SQL.
> **Info:** Replace placeholder values such as `your-api-key` with your actual credentials.

```python
from text2everything_sdk import Text2EverythingClient
Expand Down Expand Up @@ -73,9 +80,12 @@ resp = client.chat.chat_to_sql(
print("Generated SQL:", resp.sql_query)
```

Next steps:
- Add golden examples for better quality
- Connect your database and use Chat to Answer (executes SQL)
- See Guides for resource-specific tasks
The output is a SQL string produced by the service.

## Next steps
- Improve quality with more [Golden examples](./guides/golden_examples.md)
- Connect a database and use [Chat → Answer](./guides/chat.md)
- Explore resource workflows in [Guides](./guides/projects.md)
- Review client options in [Configuration](./configuration.md) and API details in [Reference](./reference)