Skip to main content

A command-line tool for executing SQL commands against the Onehouse API

Project description

Onehouse CLI

A command-line tool for executing SQL commands against the Onehouse API with synchronous responses.

Installation

pip install onehouse-cli

Setup

Configure credentials:

onehouse-cli-configure

This will prompt you for:

  • Profile name
  • Account UID
  • Project UID
  • API Key
  • API Secret
  • Project Region
  • User ID
  • Request ID
  • API Endpoint (defaults to https://api.onehouse.ai/v1)
    • Press Enter to use the default endpoint

Credentials are stored in: ~/.onehouse/credentials

Usage

Execute SQL commands:

onehouse-cli --command "SHOW LAKES" --profile myprofile

List available profiles:

onehouse-cli --list-profiles

Custom timeout (default: 10 minutes):

onehouse-cli --command "ALTER OCU SET LIMIT = '3'" --profile myprofile --timeout 5

Features

  • Synchronous execution: Automatically polls for completion (1s intervals)
  • Multiple profiles: Store and switch between different API credentials
  • Error handling: Clear error messages with headers and response details
  • Timeout control: Configurable wait time for long-running operations
  • Status checking: Check the status of an existing request by providing its request ID

Examples

# Configure first profile
onehouse-cli-configure

# Execute queries
onehouse-cli --command "SHOW LAKES" --profile apex
onehouse-cli --command "DELETE CLUSTER managed_cluster_retail" --profile apex

# Manage profiles
onehouse-cli --list-profiles

# Check status of an existing request
onehouse-cli --check-status "<REQUEST_ID>" --profile myprofile

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onehouse_cli-0.1.4.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

onehouse_cli-0.1.4-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file onehouse_cli-0.1.4.tar.gz.

File metadata

  • Download URL: onehouse_cli-0.1.4.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for onehouse_cli-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6ab26eb0a3ef84079a97494e2df91f5242ccd1a370617f9a80d4f6a9e305c504
MD5 6e6376dab9865b071cc9e10cbf8782b3
BLAKE2b-256 7ca0731472249cae66b61604ba747d708533f631d4f2e255e8ac5bc73a5588a6

See more details on using hashes here.

File details

Details for the file onehouse_cli-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: onehouse_cli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for onehouse_cli-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 93c65df0954431220dbea8d86c31551eea60b5d0a6af3ad9d4b9c0acec9a7e06
MD5 cf8198514ddf31845bc38f37cc379f42
BLAKE2b-256 e1f9346243362f6bafe98b8f920a7b36b9473df33564a07827bc4b009caa2a6a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page