Nexla CLI
The Nexla CLI is a Python library that includes convenient methods for accessing Nexla resources and data from your Python development enviorment. Check out our Guide pages for some sample recipes on how to use Nexla CLI inside a Jupyter notebook.
Nexla CLI requires Python 3 development environment. Head over to Python.org for instructions on setting up Python in your development envionment.
Getting the CLI
Download
First, click on the button below to launch the page for fetching the latest version of Nexla CLI.
Head over to the Authentication section to see how to fetch the root path and access token for accessing Nexla API.
Install
Next, using your favorite command line tool, run the following command where you have saved your downloaded Nexla CLI pacakge, run:
pip3 install <nexla-cli-package-name>
That's it! You now have the latest Nexla CLI in your machine.
You can verify cli installation using below command
nexla --version
nexlacli.version = 3.2.2
python.version = 3.9.12
os.version = macOS-12.4-x86_64-i386-64bit
Uninstall
Run the following command if you wish to uninstall Nexla CLI:
pip3 uninstall nexla
Upgrade
To upgrade the CLI version, simply uninstall the version you have and then download & install the latest version of the CLI.
Environment
With Nexla CLI you can connect to different Nexla infrastructure environments you have access to. For most users this will be Nexla's production cloud instance where you have been provided a user account, but by managing environment settings you will be able to connect to any environment you have a Nexla UI account at.
Setup Environment
Run the command below to add a new envionment to your CLI instance. Note that this needs to be run only once per environment on your machine after installation of CLI.
-> nexla env configure
When executed, this command lists the environments you've already already configured and you will be prompted for the entering the new environment Name. This is simply the URL to your Nexla UI instance without the domain protocol. So if you access Nexla at https://dataops.nexla.io
the Enironment Name will be dataops.nexla.io
-> nexla env configure
Available Environments:
- beta.nexla.com *
NEXLA Environment (ex:dataops.nexla.io): dataops.nexla.io
If your browser didn't open, please go to the following link:
https://dataops.nexla.io/token
Enter ACCESS TOKEN:
If the environment is succesfully configured then the message, "Environment Configured Successfully", is displayed. Otherwise the message, "Configuration Error: NEXLA Environment/NEXLA API Key is not valid", is displayed.
Switch Environment
Use this command to switch from one environment to another. This also lists the available environments and the current environment.
-> nexla env switch
Current Environment: beta.nexla.com
Available Environments:
- test.nexla.com
- beta.nexla.com *
Choose from available environments (ex:test.nexla.com):
If the environment is succesfully changed then the message, "Environment changed to {new env}"
Successfully", is displayed. Otherwise the message, "Enter Valid Environment Name !!", is displayed.