Skip to main content

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'

Release files for colab-preamble 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for colab-preamble 0.1.3
File Size Uploaded
colab-preamble-0.1.3.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for colab-preamble 0.1.3
File Interpreter ABI Platform
colab_preamble-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / colab-preamble-0.1.3.tar.gz

Download URL colab-preamble-0.1.3.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2a2c734db1db5aa72a5ab684b00a4f58ff45b1cce3a84e1994bcc8906e511d24
BLAKE2b-256 checksum
How to use checksums
d0adaded89c618f4657ab80fc5a4819dd2d147a48871010a1bf5cb308a8c2293
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release files / colab_preamble-0.1.3-py3-none-any.whl

Download URL colab_preamble-0.1.3-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
156f49a8938b2ccfdd79e7796a5e70e44c174a007a9227cb0f8e02c282192b87
BLAKE2b-256 checksum
How to use checksums
37614df01716329ce94a6262174542ac39287d047722a78a23a77427bbd11661
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page