Quickstart
The official Nominal Python client.
Nominal is the leading platform for operationalizing test data.
Installation
If you don’t have Python installed, you can download it for free from the Python Software Foundation. We support versions 3.9 through 3.12.
To check whether Python is installed, simply open your Terminal (Mac) or command prompt (Windows), and type python
(or python3
) in the prompt.
If you receive an error, you likely do not have Python installed on your machine.
Installing the Nominal Python Client is as straightforward as installing it with pip
:
Installing with Extras
The nominal client contains several opt-in features that come with their own additional, heavier dependencies. Today, these include:
hdf5
: ingesting / working withHDF5
filesprotos
: directly streaming data to Nominal using protobuf
You may install these using, for example, pip install nominal[hdf5]
, or pip install nominal[hdf5,protos]
for the latest version of the client.
See here for more information.
Version
We use semantic versioning for the Nominal Python Client.
To check which version of the client you have installed, you may simply inspect the __version__
variable within the package:
Upgrading `nominal` version
To update the version of the client installed using pip
, run the following:
As a best practice, we recommend regularly updating your client to ensure that you receive bugfixes and other improvements in a timely fashion.
Connect to Nominal
When using the Nominal client library, there are two primary ways of authenticating:
Storing credentials to disk
First, run the following in your terminal and follow on-screen prompts to insert the base_url and API key:
This will store your API key in a config file ~/.nominal.yml
.
The API key will automatically be used when using the client again.
Directly using credentials in your scripts
NOTE: you should never share your Nominal API key with anyone. We therefore recommend that you not save it in your code and/or scripts.
Usage examples
Upload a Dataset
Download this example CSV to your local computer:
Then upload the CSV file to Nominal:
See nm.upload_csv()
Create a Run
In Nominal, Runs are containers of multimodal test data - including Datasets, Videos, Logs, and database connections.
To see your organization’s latest Runs, head over to the Runs page
See nm.create_run()
Add Data to a Run
(Scroll up to Upload a dataset to see how the csv_dataset
was created.)
Create a Run with Data
Create a Run and add a Dataset to it in one swoop.
nm.create_run_csv()
combines upload_csv()
, create_run()
, and add_dataset()
.
Update Run metadata
See Run.update()
Please refer to the Function Reference and guides on the left-hand sidebar for more extensive examples.
Appendix
Tips & tricks for test engineers getting started with Python.
Python is the fastest growing language in STEM for data analytics. It’s free and functionally equivalent to MATLAB in many respects.
Python IDEs
If you’re new to scripting in Python, below are a few recommendations for Python IDEs (integrated development environments).
Jupyter
The guides on this website are styled after Jupyter notebook, a free and beginner-friendly analysis environment for Python. If you’re creating a lot of charts, or enjoy narrating your analysis code with text, you may find Jupyter productive.
VSCode
VSCode is a more minimalist, equally popular development environment for Python. If you’re creating automation scripts in Python that do not involve charts or analysis, the streamlined UX of VSCode may be appealing.