Skip to main content

Utilities for the Terra notebook environment.

Project description

terra-notebook-utils

Utilities for the Terra notebook environment.

  • Fetch a DRS url from a Terra data table:

    drs_url = table.fetch_drs_url("data table name", "file name")

  • Download a DRS object to your workspace VM file system:

    drs.download(drs_url, "file name")

  • Copy a DRS object to your workspace bucket:

    drs.copy(drs_url, "my_key", bucket=[bucket name])

Credentials

When running in a Terra notebook environment, no user action is required to obtain credentials. For applications outside of the Terra notebook environment, users should obtain "application default credentials" using the command gcloud auth application-default login.

Testing

The account used to run the test suite should be authorized to access TopMED data through Gen3. Credentials can be made available by logging in with the command gcloud auth application-default login.

Tests

To run tests,

  1. log in with your Google credentials using gcloud auth application-default login,
  2. install requirements with pip install -r requirements-dev.txt,
  3. run make test in the package root.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terra-notebook-utils-0.0.2.tar.gz (10.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page