bigquery-magics


Namebigquery-magics JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/googleapis/python-bigquery-magics
SummaryGoogle BigQuery magics for Jupyter and IPython
upload_time2024-09-23 17:48:09
maintainerNone
docs_urlNone
authorGoogle LLC
requires_python>=3.7
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            IPython Magics for BigQuery
===========================

|GA| |pypi| |versions|

Querying massive datasets can be time consuming and expensive without the
right hardware and infrastructure. Google `BigQuery`_ solves this problem by
enabling super-fast, SQL queries against append-mostly tables, using the
processing power of Google's infrastructure.

-  `Library Documentation`_
-  `Product Documentation`_

.. |GA| image:: https://img.shields.io/badge/support-GA-gold.svg
   :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability
.. |pypi| image:: https://img.shields.io/pypi/v/bigquery-magics.svg
   :target: https://pypi.org/project/bigquery-magics/
.. |versions| image:: https://img.shields.io/pypi/pyversions/bigquery-magics.svg
   :target: https://pypi.org/project/bigquery-magics/
.. _BigQuery: https://cloud.google.com/bigquery/what-is-bigquery
.. _Library Documentation: https://googleapis.dev/python/bigquery-magics/latest
.. _Product Documentation: https://cloud.google.com/bigquery/docs/reference/v2/

Quick Start
-----------

In order to use this library, you first need to go through the following steps:

1. `Select or create a Cloud Platform project.`_
2. `Enable billing for your project.`_
3. `Enable the Google Cloud BigQuery API.`_
4. `Setup Authentication.`_

.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
.. _Enable the Google Cloud BigQuery API.:  https://cloud.google.com/bigquery
.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html

Installation
~~~~~~~~~~~~

Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.

With `virtualenv`_, it's possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.

.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/


Supported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^
Python >= 3.7

Unsupported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Python == 3.5, Python == 3.6.


Mac/Linux
^^^^^^^^^

.. code-block:: console

    pip install virtualenv
    virtualenv <your-env>
    source <your-env>/bin/activate
    <your-env>/bin/pip install bigquery-magics


Windows
^^^^^^^

.. code-block:: console

    pip install virtualenv
    virtualenv <your-env>
    <your-env>\Scripts\activate
    <your-env>\Scripts\pip.exe install bigquery-magics

Example Usage
-------------

To use these magics, you must first register them. Run the ``%load_ext bigquery_magics``
in a Jupyter notebook cell.

.. code-block::

    %load_ext bigquery_magics

Perform a query
~~~~~~~~~~~~~~~

.. code:: python

    %%bigquery
    SELECT name, SUM(number) as count
    FROM 'bigquery-public-data.usa_names.usa_1910_current'
    GROUP BY name
    ORDER BY count DESC
    LIMIT 3

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/googleapis/python-bigquery-magics",
    "name": "bigquery-magics",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Google LLC",
    "author_email": "googleapis-packages@google.com",
    "download_url": "https://files.pythonhosted.org/packages/ae/90/55eecd8867b6a669fc31096443c2d6d4f1052691fc87499c8bd77ac7abe9/bigquery_magics-0.3.0.tar.gz",
    "platform": "Posix; MacOS X; Windows",
    "description": "IPython Magics for BigQuery\n===========================\n\n|GA| |pypi| |versions|\n\nQuerying massive datasets can be time consuming and expensive without the\nright hardware and infrastructure. Google `BigQuery`_ solves this problem by\nenabling super-fast, SQL queries against append-mostly tables, using the\nprocessing power of Google's infrastructure.\n\n-  `Library Documentation`_\n-  `Product Documentation`_\n\n.. |GA| image:: https://img.shields.io/badge/support-GA-gold.svg\n   :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability\n.. |pypi| image:: https://img.shields.io/pypi/v/bigquery-magics.svg\n   :target: https://pypi.org/project/bigquery-magics/\n.. |versions| image:: https://img.shields.io/pypi/pyversions/bigquery-magics.svg\n   :target: https://pypi.org/project/bigquery-magics/\n.. _BigQuery: https://cloud.google.com/bigquery/what-is-bigquery\n.. _Library Documentation: https://googleapis.dev/python/bigquery-magics/latest\n.. _Product Documentation: https://cloud.google.com/bigquery/docs/reference/v2/\n\nQuick Start\n-----------\n\nIn order to use this library, you first need to go through the following steps:\n\n1. `Select or create a Cloud Platform project.`_\n2. `Enable billing for your project.`_\n3. `Enable the Google Cloud BigQuery API.`_\n4. `Setup Authentication.`_\n\n.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project\n.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project\n.. _Enable the Google Cloud BigQuery API.:  https://cloud.google.com/bigquery\n.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html\n\nInstallation\n~~~~~~~~~~~~\n\nInstall this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to\ncreate isolated Python environments. The basic problem it addresses is one of\ndependencies and versions, and indirectly permissions.\n\nWith `virtualenv`_, it's possible to install this library without needing system\ninstall permissions, and without clashing with the installed system\ndependencies.\n\n.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/\n\n\nSupported Python Versions\n^^^^^^^^^^^^^^^^^^^^^^^^^\nPython >= 3.7\n\nUnsupported Python Versions\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\nPython == 3.5, Python == 3.6.\n\n\nMac/Linux\n^^^^^^^^^\n\n.. code-block:: console\n\n    pip install virtualenv\n    virtualenv <your-env>\n    source <your-env>/bin/activate\n    <your-env>/bin/pip install bigquery-magics\n\n\nWindows\n^^^^^^^\n\n.. code-block:: console\n\n    pip install virtualenv\n    virtualenv <your-env>\n    <your-env>\\Scripts\\activate\n    <your-env>\\Scripts\\pip.exe install bigquery-magics\n\nExample Usage\n-------------\n\nTo use these magics, you must first register them. Run the ``%load_ext bigquery_magics``\nin a Jupyter notebook cell.\n\n.. code-block::\n\n    %load_ext bigquery_magics\n\nPerform a query\n~~~~~~~~~~~~~~~\n\n.. code:: python\n\n    %%bigquery\n    SELECT name, SUM(number) as count\n    FROM 'bigquery-public-data.usa_names.usa_1910_current'\n    GROUP BY name\n    ORDER BY count DESC\n    LIMIT 3\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Google BigQuery magics for Jupyter and IPython",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://github.com/googleapis/python-bigquery-magics"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6451e70c8dda89c6bdba9b3f8c711f07bfefb5a31acdeb27a2e1f42e92eeda9b",
                "md5": "92c6d75fe8dec52c510dcf4d2743b436",
                "sha256": "a90af320d929b249405fc3582f24306c0defefdd5488b04d6939dbabb36a1fd3"
            },
            "downloads": -1,
            "filename": "bigquery_magics-0.3.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "92c6d75fe8dec52c510dcf4d2743b436",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 28607,
            "upload_time": "2024-09-23T17:48:07",
            "upload_time_iso_8601": "2024-09-23T17:48:07.804289Z",
            "url": "https://files.pythonhosted.org/packages/64/51/e70c8dda89c6bdba9b3f8c711f07bfefb5a31acdeb27a2e1f42e92eeda9b/bigquery_magics-0.3.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ae9055eecd8867b6a669fc31096443c2d6d4f1052691fc87499c8bd77ac7abe9",
                "md5": "7dcaa345b2d5ca10e3b60656d8bf996d",
                "sha256": "f73cfdfed1b092432c5b2847b84b56b3b9dd0603c6d7395124baa9545476bcd4"
            },
            "downloads": -1,
            "filename": "bigquery_magics-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7dcaa345b2d5ca10e3b60656d8bf996d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 38108,
            "upload_time": "2024-09-23T17:48:09",
            "upload_time_iso_8601": "2024-09-23T17:48:09.020292Z",
            "url": "https://files.pythonhosted.org/packages/ae/90/55eecd8867b6a669fc31096443c2d6d4f1052691fc87499c8bd77ac7abe9/bigquery_magics-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-23 17:48:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "googleapis",
    "github_project": "python-bigquery-magics",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "bigquery-magics"
}
        
Elapsed time: 0.63901s