Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Module Overview

Graham Wheeler edited this page May 25, 2016 · 2 revisions

The datalab package comprises a number of modules:

  • datalab.bigquery - Python classes and functions for working with Google BigQuery;
  • datalab.bigquery.commands - IPython notebook cell/line magics for working with BigQuery;
  • datalab.context - Python classes and functions for obtaining credentials for using [Google Cloud Platform] services like BigQuery, and enumerating the projects available to those credentials;
  • datalab.context.commands - IPython magics for enumerating projects and for setting a default project;
  • datalab.data - Python classes and functions for defining SQL modules and working with CSV files;
  • datalab.data.commands - IPython magics for working with SQL and CSV files;
  • datalab.kernel - a Jupyter kernel extension for using the datalab package in Jupyter; primarily responsible for importing all the datalab.*.commands pacakages and registering their magics;
  • datalab.notebook - an IPython notebook extension, primarily responsible for installing some Javascript and CSS files used for charting, etc, by the Python code;
  • datalab.storage - Python classes and functions for working with Google Cloud Storage (GCS);
  • datalab.storage.commands - IPython magics for working with GCS;
  • datalab.utils - a collection of utility classes and functions used in support of the other modules;
  • datalab.utils.commands - a set of useful IPython magics supporting things like drawing charts with Google Charts

You will notice that for each module under datalab., there is often a module with the same name but an additional commands extension. The former provide support for the latter, as well as providing a set of Python APIs for those familiar with Python to use. The latter provide cell or line magic functions which allow you to perform many tasks declaratively without having to write any Python code. These are not used directly but are instead all imported by the datalab.kernel module, which is loaded as a Jupyter kernel extension in order to enable their functionality (see Getting Started for how to load the extension).