hdxcli


Namehdxcli JSON
Version 1.0rc49 PyPI version JSON
download
home_page
SummaryHydrolix command line utility to do CRUD operations on projects, tables, transforms and other resources in Hydrolix clusters
upload_time2024-03-15 18:14:14
maintainer
docs_urlNone
authorGerman Diago Gomez
requires_python>=3.10,<4.0
licenseMIT
keywords database bigdata hydrolix
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![](images/hdxcli.png)](https://github.com/hydrolix/hdx-cli)


`hdxcli` is a command-line tool to work with hydrolix projects and tables
interactively.

Common operations such as CRUD operations on projects/tables/transforms 
and others  can be performed.

# Hdx-cli installation

You can install `hdxcli` from pip:

```shell
pip install hdxcli
```
## System Requirements
Python version `>= 3.10` is required.

Make sure you have the correct Python version installed before proceeding 
with the installation of `hdxcli`.

# Usage

## Command-line tool organization

The tool is organized, mostly with the general invocation form of:

```shell
hdxcli <resource> [<subresource...] <verb> [<resource_name>]
```

Table and project resources have defaults that depend on the profile
you are working with, so they can be omitted if you previously used 
the `set` command.

For all other resources, you can use `--transform`, `--dictionary`, 
`--source`, etc. Please see the command line help for more information.

## Profiles
`hdxcli` supports multiple profiles. You can use a default profile or
use the `--profile` option to operate on a non-default profile.

When trying to invoke a command, if a login to the server is necessary, 
a prompt will be shown and the token will be cached.

## Listing and showing profiles

Listing profiles:
```shell
hdxcli profile list
```

Showing default profile:
```shell
hdxcli profile show
```

## Projects, tables and transforms

The basic operations you can do with these resources are:

- list them
- create a new resource
- delete an existing resource
- modify an existing resource
- show a resource in raw json format
- show settings from a resource
- write a setting
- show a single setting

## Working with transforms

You can create and override transforms with the following commands.

Create a transform:
``` shell
hdxcli transform create -f <transform-settings-file> <transform-name>
```

Remember that a transform is applied to a table in a project, so whatever 
you set with the command-line tool will be the target of your transform.


If you want to override it, do:

``` shell
hdxcli --project <project-name> --table <table-name> transform create -f <transform-settings-file>.json <transform-name>
```

## Ingest
### Batch Job
Create a batch job:

``` shell
hdxcli job batch ingest <job-name> <job-settings>.json
```

`job-name` is the name of the job that will be displayed when listing batch 
jobs. `job-settings` is the path to the file containing the specifications 
required to create that ingestion (for more information on the required 
specifications, see Hydrolix API Reference).

In this case, the project, table, and transform are being omitted and the 
CLI will use the default transform within the project and table previously 
configured in the profile with the `--set` command. Otherwise, you can add 
`--project <project-name>, --table <table-name> --transform <transform-name>`.

This allows you to execute the command as follows:
``` shell
hdxcli --project <project-name>, --table <table-name> --transform <transform-name> job batch ingest <job-name> <job-settings>.json
```

# Commands

- Profile
  - *list*
    - `hdxcli profile list`
  - *add*
    - `hdxcli profile add <profile-name>`
  - *show*
    - `hdxcli --profile <profile-name> profile show`
- Set/Unset
  - *set*
    - `hdxcli set <project-name> <table-name>`
  - *unset*
    - `hdxcli unset`
- Project
  - *list*
    - `hdxcli project list`
  - *create*
    - `hdxcli project create <project-name>`
  - *delete*
    - `hdxcli project delete <project-name>`
  - *activity*
    - `hdxcli --project <project-name> project activity`
  - *stats*
    - `hdxcli --project <project-name> project stats`
  - *show*
    - `hdxcli --project <project-name> project show`
  - *settings*
    - `hdxcli --project <project-name> project settings`
    - `hdxcli --project <project-name> project settings <setting-name>`
    - `hdxcli --project <project-name> project settings <setting-name> <new-value>`
- Table
- Transform
- Job
- Purgejobs
- Sources
- Dictionary
- Dictionary Files
- Function
- Storage
- Integration
- Migrate
- Version

# FAQ: Common operations

## Showing help 

In order to see what you can do with the tool:

``` shell
hdxcli --help
```

Check which commands are available for each resource by typing:
``` shell
hdxcli [<resource>...] [<verb>] --help
```

## Performing operations against another server

If you want to use `hdxcli` against another server, use `--profile` option:
``` shell
hdxcli --profile <profile-name> project list
```

## Obtain indented resource information

When you use the verb `show` on any resource, the output looks like this:
``` shell
hdxcli --project <project-name> project show
{"name": "project-name", "org": "org-uuid", "description": "description", "uuid": "uuid", ...}
```

If you need to have an indented json version, just add `-i`, `--indent int`:
``` shell
hdxcli --project <project-name> project show -i 4
{
    "name": "project-name", 
    "org": "org-uuid", 
    "description": "description", 
    "uuid": "uuid", 
    ...,
}
```
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "hdxcli",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "database,bigdata,hydrolix",
    "author": "German Diago Gomez",
    "author_email": "german@hydrolix.io",
    "download_url": "https://files.pythonhosted.org/packages/d3/4b/7050855a24dc64952192ecf07ed9e9a9ee0430145cf4e0bdda545ead0320/hdxcli-1.0rc49.tar.gz",
    "platform": null,
    "description": "[![](images/hdxcli.png)](https://github.com/hydrolix/hdx-cli)\n\n\n`hdxcli` is a command-line tool to work with hydrolix projects and tables\ninteractively.\n\nCommon operations such as CRUD operations on projects/tables/transforms \nand others  can be performed.\n\n# Hdx-cli installation\n\nYou can install `hdxcli` from pip:\n\n```shell\npip install hdxcli\n```\n## System Requirements\nPython version `>= 3.10` is required.\n\nMake sure you have the correct Python version installed before proceeding \nwith the installation of `hdxcli`.\n\n# Usage\n\n## Command-line tool organization\n\nThe tool is organized, mostly with the general invocation form of:\n\n```shell\nhdxcli <resource> [<subresource...] <verb> [<resource_name>]\n```\n\nTable and project resources have defaults that depend on the profile\nyou are working with, so they can be omitted if you previously used \nthe `set` command.\n\nFor all other resources, you can use `--transform`, `--dictionary`, \n`--source`, etc. Please see the command line help for more information.\n\n## Profiles\n`hdxcli` supports multiple profiles. You can use a default profile or\nuse the `--profile` option to operate on a non-default profile.\n\nWhen trying to invoke a command, if a login to the server is necessary, \na prompt will be shown and the token will be cached.\n\n## Listing and showing profiles\n\nListing profiles:\n```shell\nhdxcli profile list\n```\n\nShowing default profile:\n```shell\nhdxcli profile show\n```\n\n## Projects, tables and transforms\n\nThe basic operations you can do with these resources are:\n\n- list them\n- create a new resource\n- delete an existing resource\n- modify an existing resource\n- show a resource in raw json format\n- show settings from a resource\n- write a setting\n- show a single setting\n\n## Working with transforms\n\nYou can create and override transforms with the following commands.\n\nCreate a transform:\n``` shell\nhdxcli transform create -f <transform-settings-file> <transform-name>\n```\n\nRemember that a transform is applied to a table in a project, so whatever \nyou set with the command-line tool will be the target of your transform.\n\n\nIf you want to override it, do:\n\n``` shell\nhdxcli --project <project-name> --table <table-name> transform create -f <transform-settings-file>.json <transform-name>\n```\n\n## Ingest\n### Batch Job\nCreate a batch job:\n\n``` shell\nhdxcli job batch ingest <job-name> <job-settings>.json\n```\n\n`job-name` is the name of the job that will be displayed when listing batch \njobs. `job-settings` is the path to the file containing the specifications \nrequired to create that ingestion (for more information on the required \nspecifications, see Hydrolix API Reference).\n\nIn this case, the project, table, and transform are being omitted and the \nCLI will use the default transform within the project and table previously \nconfigured in the profile with the `--set` command. Otherwise, you can add \n`--project <project-name>, --table <table-name> --transform <transform-name>`.\n\nThis allows you to execute the command as follows:\n``` shell\nhdxcli --project <project-name>, --table <table-name> --transform <transform-name> job batch ingest <job-name> <job-settings>.json\n```\n\n# Commands\n\n- Profile\n  - *list*\n    - `hdxcli profile list`\n  - *add*\n    - `hdxcli profile add <profile-name>`\n  - *show*\n    - `hdxcli --profile <profile-name> profile show`\n- Set/Unset\n  - *set*\n    - `hdxcli set <project-name> <table-name>`\n  - *unset*\n    - `hdxcli unset`\n- Project\n  - *list*\n    - `hdxcli project list`\n  - *create*\n    - `hdxcli project create <project-name>`\n  - *delete*\n    - `hdxcli project delete <project-name>`\n  - *activity*\n    - `hdxcli --project <project-name> project activity`\n  - *stats*\n    - `hdxcli --project <project-name> project stats`\n  - *show*\n    - `hdxcli --project <project-name> project show`\n  - *settings*\n    - `hdxcli --project <project-name> project settings`\n    - `hdxcli --project <project-name> project settings <setting-name>`\n    - `hdxcli --project <project-name> project settings <setting-name> <new-value>`\n- Table\n- Transform\n- Job\n- Purgejobs\n- Sources\n- Dictionary\n- Dictionary Files\n- Function\n- Storage\n- Integration\n- Migrate\n- Version\n\n# FAQ: Common operations\n\n## Showing help \n\nIn order to see what you can do with the tool:\n\n``` shell\nhdxcli --help\n```\n\nCheck which commands are available for each resource by typing:\n``` shell\nhdxcli [<resource>...] [<verb>] --help\n```\n\n## Performing operations against another server\n\nIf you want to use `hdxcli` against another server, use `--profile` option:\n``` shell\nhdxcli --profile <profile-name> project list\n```\n\n## Obtain indented resource information\n\nWhen you use the verb `show` on any resource, the output looks like this:\n``` shell\nhdxcli --project <project-name> project show\n{\"name\": \"project-name\", \"org\": \"org-uuid\", \"description\": \"description\", \"uuid\": \"uuid\", ...}\n```\n\nIf you need to have an indented json version, just add `-i`, `--indent int`:\n``` shell\nhdxcli --project <project-name> project show -i 4\n{\n    \"name\": \"project-name\", \n    \"org\": \"org-uuid\", \n    \"description\": \"description\", \n    \"uuid\": \"uuid\", \n    ...,\n}\n```",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Hydrolix command line utility to do CRUD operations on projects, tables, transforms and other resources in Hydrolix clusters",
    "version": "1.0rc49",
    "project_urls": null,
    "split_keywords": [
        "database",
        "bigdata",
        "hydrolix"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8202d0577043c9ed09202f5f69d1feefd1b410fa494c7caf0379558e0d9e88d2",
                "md5": "20af4fe777b58b618b0f5c293cbc3132",
                "sha256": "6c97beac9acc2670ccdb040c1adaa23fa816adc8e2c003cf7dc6679a37ba73de"
            },
            "downloads": -1,
            "filename": "hdxcli-1.0rc49-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "20af4fe777b58b618b0f5c293cbc3132",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 97050,
            "upload_time": "2024-03-15T18:14:12",
            "upload_time_iso_8601": "2024-03-15T18:14:12.310581Z",
            "url": "https://files.pythonhosted.org/packages/82/02/d0577043c9ed09202f5f69d1feefd1b410fa494c7caf0379558e0d9e88d2/hdxcli-1.0rc49-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d34b7050855a24dc64952192ecf07ed9e9a9ee0430145cf4e0bdda545ead0320",
                "md5": "ee5c7591c85ff3de4d51efd1ce8b9141",
                "sha256": "19ae81750b38430a3ee6844451a297911bedd88766b2a88b2a1866e8e0cc1d72"
            },
            "downloads": -1,
            "filename": "hdxcli-1.0rc49.tar.gz",
            "has_sig": false,
            "md5_digest": "ee5c7591c85ff3de4d51efd1ce8b9141",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 66960,
            "upload_time": "2024-03-15T18:14:14",
            "upload_time_iso_8601": "2024-03-15T18:14:14.269360Z",
            "url": "https://files.pythonhosted.org/packages/d3/4b/7050855a24dc64952192ecf07ed9e9a9ee0430145cf4e0bdda545ead0320/hdxcli-1.0rc49.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-15 18:14:14",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "hdxcli"
}
        
Elapsed time: 0.46122s