- create - CreateSandbox
- exec - Exec
- execute_code - ExecuteCode
- get_tool_availability - GetToolAvailability
- load_connector_data - LoadConnectorData
- execute_bash - Runs in the caller's own worker; no connector/source scoping.
- execute_query - ExecuteQuery
CreateSandbox
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.sandbox.create()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
sandbox_id |
OptionalNullable[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.SandboxExecServiceCreateSandboxResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Exec
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.sandbox.exec()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
sandbox_id |
Optional[str] | ➖ | N/A |
command |
Optional[str] | ➖ | N/A |
kind |
Optional[str] | ➖ | "" | "bash" | "sh" | "shell" | "python" | "py" |
env |
Dict[str, str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.SandboxExecServiceExecResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
ExecuteCode
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.sandbox.execute_code()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
sandbox_id |
Optional[str] | ➖ | N/A |
code |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.SandboxExecServiceExecuteCodeResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetToolAvailability
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.sandbox.get_tool_availability(body={})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
body |
models.TextqlRPCPublicSandboxExecGetToolAvailabilityRequest | ✔️ | N/A |
connect_timeout_ms |
Optional[float] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.SandboxExecServiceGetToolAvailabilityResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
LoadConnectorData
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.sandbox.load_connector_data()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
sandbox_id |
Optional[str] | ➖ | N/A |
connector_id |
Optional[int] | ➖ | N/A |
query |
Optional[str] | ➖ | N/A |
tql_path |
Optional[str] | ➖ | N/A |
params |
Dict[str, Nullable[models.GoogleProtobufValue]] | ➖ | Represents a JSON object. An unordered key-value map, intending to perfectly capture the semantics of a JSON object. This enables parsing any arbitrary JSON payload as a message field in ProtoJSON format. This follows RFC 8259 guidelines for interoperable JSON: notably this type cannot represent large Int64 values or NaN/Infinity numbers,since the JSON format generally does not support those values in its number type. If you do not intend to parse arbitrary JSON into your message, a custom typed message should be preferred instead of using this type. |
max_rows |
Optional[int] | ➖ | N/A |
dataframe_name |
OptionalNullable[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.SandboxExecServiceLoadConnectorDataResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
Runs in the caller's own worker; no connector/source scoping.
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.sandbox.execute_bash()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
script |
Optional[str] | ➖ | N/A |
env |
Dict[str, str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.SandboxQueryServiceExecuteBashResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
ExecuteQuery
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.sandbox.execute_query(body={
"sql_query": {},
})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
body |
models.TextqlRPCPublicSandboxQuerySandboxExecuteQueryRequest | ✔️ | N/A |
connect_timeout_ms |
Optional[float] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.SandboxQueryServiceExecuteQueryResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |