--- id: bigquery-magics version: "0.15.1" license: Apache 2.0 license_treatment: permissive maintenance: active --- # bigquery-magics — Google BigQuery magics for Jupyter and IPython License: permissive · Maintenance: active · Downloads: 226.2K/mo ## What it is and what it does bigquery-magics extends IPython and Jupyter with magic commands that let you write and execute BigQuery SQL queries directly in notebook cells. Instead of writing Python code to instantiate a client and fetch results, you use `%%bigquery` to run SQL and get back a pandas DataFrame automatically. The package wraps google-cloud-bigquery and handles the connection, authentication, and result formatting for you. It's designed for data analysts and engineers working in Jupyter environments who want to explore BigQuery datasets interactively without leaving the notebook. The magic commands integrate with the notebook's display system to show query results inline, and they depend on ipywidgets, ipython, and pandas to provide a seamless interactive experience. You must have a Google Cloud project with BigQuery enabled and valid credentials configured before use. Use it for: - Exploratory data analysis on BigQuery tables directly from a Jupyter notebook without writing boilerplate client code. - Teaching or documenting BigQuery SQL workflows in notebooks where SQL queries are the primary focus. - Building data science workflows where analysts switch between SQL queries and pandas manipulation in the same notebook. - Prototyping analytics queries interactively before deploying them to production pipelines. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides IPython magic commands to query Google BigQuery directly from Jupyter notebooks and IPython shells, with results returned as pandas DataFrames. Yes, if you work with BigQuery in Jupyter notebooks. Low install friction, active maintenance, no known vulnerabilities, and permissive licensing make it a safe choice. The package solves a real friction point—writing SQL queries in notebooks without boilerplate—and integrates cleanly with the IPython ecosystem. Prerequisite: you must already have a Google Cloud project with BigQuery API enabled and authentication set up. ## Install pip install bigquery-magics uv add bigquery-magics poetry add bigquery-magics ## Installing bigquery-magics Before you install: Low install friction; pure Python wheel with no compiled dependencies. Actively maintained with a recent release and 5373 repository stars. Supports current Python versions (3.10–3.14). License in practice: Apache 2.0 permissive license allows use in commercial and open-source projects with minimal restrictions. Quickstart: pip install bigquery-magics In a Jupyter notebook: %load_ext bigquery_magics %%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 Requires Python >= 3.10; Google Cloud project with BigQuery API enabled and authentication configured (service account or user credentials). Verify before relying: - Whether the package handles authentication transparently via Application Default Credentials or requires manual setup in all cases. - Performance characteristics when querying very large result sets or long-running queries. ## Package facts - License: Apache 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 226.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags bigquery jupyter magic commands, ipython bigquery queries, notebook sql bigquery, google cloud bigquery magics, jupyter bigquery integration, jupyter-integration, bigquery, sql-notebook [View on SkillFed](https://skillfed.io/packages/bigquery-magics) · [View on PyPI](https://pypi.org/project/bigquery-magics/)