Skip to main content

Prepare google colabpratory by one line of command

Project description

COLAB PREAMBLE

Prepare google colaboratory by one line of command

Installation

# from pypi
$ pip install colab-preamble

# alternatively, from github
$ git clone https://github.com/kota7/colab-preamble --depth 1
$ pip install -U ./colab-preamble

Example

Example colab notebook is here: colab-preamble-example.ipynb

Usage

import colab_preamble

colab_preamble_run(google_cloud_project="<project-id>", mount_drive=True)
# If no need to access google cloud services, no need to provide set google_cloud_project=None
# If no need to mount google drive, set mount_drive=False

Effect

When google_cloud_project is given,

  • Set the default project ID
    • Run gcloud config set ...
    • Set GOOGLE_CLOUD_PROJECT environment variable
  • Open the authentication prompt
  • Introduce bigquery magic command bq

When mount_drive is true,

  • Open the prompt and mount the google drive at '/content/drive'

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

colab-preamble-0.1.3.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

colab_preamble-0.1.3-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

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