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.2.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.2-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: onehouse_cli-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 6f76fd24daa6d080e47021351acc2dc4d5b7f83e2d7df5e9c26b68c2344d8b19
MD5 8a5ab0ec47fa3fb9cfcbd5b0bd0a9f0c
BLAKE2b-256 69e15713d18a67487bb962b57c1defe16f6638ec50c9e31f3feb5881c273979f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onehouse_cli-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 006dd100bcad42ad14fdc909c8f645e8cd22edb3217b24444b059f32be9f62c8
MD5 b5df1608d34f55a8dcd37349f2e17303
BLAKE2b-256 cfbb8dc7ee0ec1fc1fd6dd74859dbb507453db010c80bbd84c101bc2e9963375

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