Skip to main content

Automate Nominal workflows in Python

Project description

⬖ Nominal

Python client for Nominal test data, storage, & compute

🚧 WIP - API and syntax subject to change

Install

pip3 install nominal --upgrade

Usage

Setup

Retrieve your API key from /sandbox on your Nominal tenant

import nominal as nm
nm.cloud.set_token(...)

API base URL is set to prod by default

import nominal as nm
nm.cloud.set_base_url('PROD') # Set to 'STAGING' for development
nm.cloud.get_base_url()
# 'https://api.gov.nominal.io/api'

Upload a Dataset (4 lines)

import nominal as nm
from nominal import Ingest, Dataset
dataset = Dataset(nm.data.penguins())
# dataset = Ingest().read('../path/to/your/data.csv')
dataset.upload()

Upload a Run (4 lines)

import nominal as nm
from nominal import Run, Dataset
r = Run(datasets=[Dataset(nm.data.penguins())])
# r = Run(path='../path/to/your/data.csv')
r.upload()

Update metadata of an existing Run (4 lines)

from nominal import Run
r = Run(rid = 'ri.scout.gov-staging.run.ce205f7e-9ef1-4a8b-92ae-11edc77441c6')
r.title = 'my_new_run_title'
r.update()

Compare changes made to a Run locally

r.title = 'my_new__new_run_title'
r.diff()

Apply a Check to a Run

TODO

Development

Install the following VSCode extensions:

  • Ruff
  • isort

And add the following lines to User Settings (JSON):

    "[python]": {
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "charliermarsh.ruff",
        "editor.codeActionsOnSave": {
            "source.organizeImports": "explicit",
        },
    },

To make sure your code is linted properly on save.

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

nominal-0.0.40.tar.gz (247.2 kB view details)

Uploaded Source

Built Distribution

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

nominal-0.0.40-py3-none-any.whl (269.9 kB view details)

Uploaded Python 3

File details

Details for the file nominal-0.0.40.tar.gz.

File metadata

  • Download URL: nominal-0.0.40.tar.gz
  • Upload date:
  • Size: 247.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for nominal-0.0.40.tar.gz
Algorithm Hash digest
SHA256 77538a77e73e9c4a6feaa20deb572b6175c16f678a0dd270c6bfd77750b86dff
MD5 7f4504d48ad2b4241c5e71875fc91a2a
BLAKE2b-256 74625d2c6d12e29943b877d745243a6520f320d3e7aef405dc4834c321116be7

See more details on using hashes here.

File details

Details for the file nominal-0.0.40-py3-none-any.whl.

File metadata

  • Download URL: nominal-0.0.40-py3-none-any.whl
  • Upload date:
  • Size: 269.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for nominal-0.0.40-py3-none-any.whl
Algorithm Hash digest
SHA256 a164194f0744761e81cc2c2ff67607e82673afd6f94d9d43766a17e56994fac4
MD5 d1fccc9ee50f555ee22a8fc819117180
BLAKE2b-256 58da25ad9e85f33c9c2ac8b041f0ddea9a60d6860f7632a59f8573da0f15b146

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