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 details)

Uploaded Source

File details

Details for the file terra-notebook-utils-0.0.2.tar.gz.

File metadata

  • Download URL: terra-notebook-utils-0.0.2.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

File hashes

Hashes for terra-notebook-utils-0.0.2.tar.gz
Algorithm Hash digest
SHA256 29e4f4de27c1ac5b5be1d40c7e994c95e88a1cb258e7d10ddb56ebf2531bbad2
MD5 4e822c48b7714a08321c74169265eb3d
BLAKE2b-256 178406b9b76042b01221ebb758014183c91d685215b023cada4b00da220e06e9

See more details on using hashes here.

Provenance

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