From 5d6eae75adc0695a3110f8023f4b100b74f77754 Mon Sep 17 00:00:00 2001 From: mrinalwalia Date: Thu, 2 Oct 2025 16:00:20 -0400 Subject: [PATCH] add the updated guides pages -installation -quickstart -configuration --- documentation/docs/configuration.md | 18 ++++++++++------ documentation/docs/installation.md | 33 ++++++++++++++++++++++++++--- documentation/docs/quickstart.md | 30 +++++++++++++++++--------- 3 files changed, 61 insertions(+), 20 deletions(-) diff --git a/documentation/docs/configuration.md b/documentation/docs/configuration.md index 7dbd5df..c96be7a 100644 --- a/documentation/docs/configuration.md +++ b/documentation/docs/configuration.md @@ -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 @@ -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://...", @@ -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() -``` - - +``` \ No newline at end of file diff --git a/documentation/docs/installation.md b/documentation/docs/installation.md index 4179e44..0af8c2c 100644 --- a/documentation/docs/installation.md +++ b/documentation/docs/installation.md @@ -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 diff --git a/documentation/docs/quickstart.md b/documentation/docs/quickstart.md index 2656d29..7be0671 100644 --- a/documentation/docs/quickstart.md +++ b/documentation/docs/quickstart.md @@ -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 @@ -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)