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
  • Environment (production or staging)

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.3.tar.gz (8.5 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.3-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: onehouse_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 8.5 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.3.tar.gz
Algorithm Hash digest
SHA256 14a402bef1edaf7233336117b470d7b873af1b4916a7fd0ebe2ba134667a959d
MD5 51db5e24f82dd7e8a72985bd0ab91fd5
BLAKE2b-256 6d6ddfa57fa417ae55a5008af266b6600ab723744194a915a7547f8d02e55f43

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onehouse_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1c4f1071dc8306dba9736028c100235c3b1d38a991bd53ad13ff56f63c1cd49d
MD5 b0aa929302232c913c61aa354e3dd6cf
BLAKE2b-256 b5fcede7ebfd70acb919194a97d9f868a9b19c70920f9cd62f12be0f213859cf

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