Skip to main content

Hydrolix command line utility to do CRUD operations on projects, tables, transforms and other resources in Hydrolix clusters

Project description

hdxcli is the command-line tool to work with your Hydrolix clusters. It helps you manage resources like projects, tables, and Service Accounts. You can use it to automate tasks and include Hydrolix in your scripts and workflows.

System Requirements

  • Python: >= 3.10

Make sure you have the correct Python version installed.

Installation

You can install hdxcli using pip:

  pip install hdxcli

First Steps: Initial Setup

When you run your first hdxcli command (for example, hdxcli project list), if the CLI does not find a previous setup, it will guide you to create a 'default' connection profile. You will need to enter:

  1. The hostname of your Hydrolix cluster (e.g., mycluster.hydrolix.live).
  2. If the connection will use TLS (https) (recommended).

After setting up the profile, you will be asked to log in with your Hydrolix username and password. After a successful login, you can choose how the CLI will authenticate for future operations:

  • Continue using your user credentials.
  • Set up the CLI to use a Service Account. This is useful for longer sessions or for automated scripts.

You can also start this setup process yourself by running:

  hdxcli init

This command is good if you prefer to set up the CLI before running other commands.

General Usage

The main way to use commands is:

hdxcli [GLOBAL OPTIONS] RESOURCE [ACTION] [SPECIFIC ARGUMENTS...]

For example, hdxcli project list or hdxcli table --project myproject create mytable

Common Global Options (see hdxcli --help for all options):

  • --profile PROFILE_NAME: Use a specific connection profile.

  • --username USERNAME: Username for login (if needed).

  • --password PASSWORD: Password for login (if --username is used).

  • --uri-scheme [http|https]</var>: Choose the connection scheme (http or https).

  • --timeout SECONDS: Timeout for API requests.

  • Connection Profiles

Profiles let you save settings for different Hydrolix clusters or users.

  • List profiles: hdxcli profile list
  • View details of the 'default' profile: hdxcli profile show default
  • Use a profile in a command: hdxcli --profile my_other_profile project list

Default Project and Table Context

To make commands simpler, you can set a "current" or "default" project and table.

  • Set default project and table:

    hdxcli set <project-name> <table-name>
    

    Example: hdxcli set weblogs access_logs

  • After setting defaults, commands for tables or transforms will not need --project or --table options:

    hdxcli transform show my_transform # Will use project and table set by 'set' command
    
  • Clear default project and table:

    hdxcli unset
    

Main Commands (Summary)

hdxcli commands are grouped by the type of resource they manage. Use hdxcli --help to see all commands. Some of the main groups are:

  • profile: Manage your connection profiles.
  • init: Initialize hdxcli configuration.
  • set / unset: Set or clear the default project/table.
  • project: Create, list, delete, and manage projects.
  • table: Manage tables inside projects.
  • transform: Manage transforms.
  • service-account: Manage Service Accounts and their tokens.
  • job: Manage ingestion jobs.
  • (Other important groups like dictionary, function, storage, etc.)
  • version: Show the hdxcli version.

To get help for a specific command group or command:

    hdxcli project --help
    hdxcli project create --help

Usage Examples

  1. Set up the CLI, log in, and list projects:

    $ hdxcli init
    # ... follow prompts to set up hostname, scheme, and login ...
    # ... optionally, set up a Service Account ...
    
    $ hdxcli project list
    project_a
    project_b
    
  2. Create a new project and then a table:

    $ hdxcli project create my_new_project
    Created project 'my_new_project'
    
    $ hdxcli table --project my_new_project create my_new_table
    Created table 'my_new_table'
    
  3. Set a default context and show transform details:

    $ hdxcli set my_new_project my_new_table
    Profile 'default' set project/table
    
    $ hdxcli transform show my_existing_transform
    # ... (output of the transform) ...
    
  4. Show project information in indented JSON format:

    $ hdxcli project show my_new_project -i
    {
        "name": "my_new_project",
        "org_id": "xxxx-xxxx-xxxx-xxxx",
        ...
    }
    

Getting Help

  • For an overview of commands: hdxcli --help
  • For help on a specific resource or action: hdxcli <resource> --help or hdxcli <resource> <action> --help
  • For more in-depth information, check out the official Hydrolix documentation.

License

License: Apache 2.0

This project is licensed under the terms of the Apache License 2.0. You can find a copy of the license in the LICENSE file included in this repository.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

hdxcli-1.0.83.tar.gz (126.2 kB view details)

Uploaded Source

Built Distribution

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

hdxcli-1.0.83-py3-none-any.whl (186.6 kB view details)

Uploaded Python 3

File details

Details for the file hdxcli-1.0.83.tar.gz.

File metadata

  • Download URL: hdxcli-1.0.83.tar.gz
  • Upload date:
  • Size: 126.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-79-generic

File hashes

Hashes for hdxcli-1.0.83.tar.gz
Algorithm Hash digest
SHA256 9df61d5e1f348e30114decf09533ed5c8a5d2436ef2f0dca670c356dacfd31dc
MD5 075744ea283e8c1eedc499917155c443
BLAKE2b-256 cea9722bc450a58f2a21b1801bc9426eee8c27cb4aa3710c682a7cdcef5cfb3c

See more details on using hashes here.

File details

Details for the file hdxcli-1.0.83-py3-none-any.whl.

File metadata

  • Download URL: hdxcli-1.0.83-py3-none-any.whl
  • Upload date:
  • Size: 186.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-79-generic

File hashes

Hashes for hdxcli-1.0.83-py3-none-any.whl
Algorithm Hash digest
SHA256 b19a3b9cdaf7040b852be752c2cf61a92a51f797b43c4404066fe2731b95b4a0
MD5 c75d40e572f28066ef17bf88a0ea5723
BLAKE2b-256 7f7d572403dfcef6ee79b1fb05864e0bdb0eb30962999ebca48bc0ccecca2214

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