A command-line interface for interacting with Matatika services.
- Python >=3.7
The Matatika CLI/SDK is available through PyPi here and can be installed using
pip install matatika
You can check if the CLI/SDK installed successfully by running the following command:
For all commands, the CLI requires an authentication token and endpoint URL to make successful HTTP requests to the Matatika API. Sometimes, a workspace ID is also required if the operation is specific to a workspace (i.e. listing all datasets in or publishing datasets to a workspace). The CLI can resolve these variables from one of the following sources, respecting the order of precedence as listed:
- Command option
- System environment
- Default context
Each variable is resolve separately, meaning that it is possible to - for example - specify a authentication token as an environment variable, a endpoint URL as a command option and a workspace ID in the default context. When specifying a variable in more than one source, the CLI will check each by the order of precedence define above and resolve the first variable it finds. For debugging purposes, including the
--trace flag on the base
matatika command will print the value and source of each resolved variable before processing the statement.
--endpoint-url options can be specified on the base
--workspace-id can be specified on certain commands that involve interacting with a workspace (e.g. the
list datasets command). See command-specific documentation for more information.
--help after any CLI command will provide detailed information on its usage.
# set an authentication token export AUTH_TOKEN=$AUTH_TOKEN_VALUE # set an endpoint URL export ENDPOINT_URL=$ENDPOINT_URL_VALUE # set a workspace ID export WORKSPACE_ID=$WORKSPACE_ID_VALUE