{"id":9019,"library":"google-cloud-jupyter-config","title":"Google Cloud Jupyter Config","description":"google-cloud-jupyter-config is a Python library that provides utilities for Jupyter environments to retrieve configuration information directly from the Google Cloud SDK (gcloud CLI) and Google Cloud metadata server. It's designed to be a reusable helper for other Jupyter extensions and applications, enabling seamless access to details like project IDs and authentication tokens. The current version is 0.0.12, with releases being infrequent and often tied to the broader 'jupyter-extensions' project.","status":"active","version":"0.0.12","language":"python","source_language":"en","source_url":"https://github.com/GoogleCloudPlatform/jupyter-extensions/tree/master/google-cloud-jupyter-config","tags":["google-cloud","gcp","jupyter","configuration","auth","gcloud"],"install":[{"cmd":"pip install google-cloud-jupyter-config","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"This library relies on the `gcloud` command-line tool for configuration retrieval. While not a direct Python dependency, it's a functional requirement for full utility.","package":"google-cloud-sdk","optional":false},{"reason":"Minimum Python version required.","package":"Python >=3.8","optional":false}],"imports":[{"wrong":"from jupyter_config import project","symbol":"project","correct":"from google.cloud.jupyter_config import project"}],"quickstart":{"code":"import os\nfrom google_cloud_jupyter_config import project\nfrom google_cloud_jupyter_config import token\n\n# Ensure gcloud CLI is configured, or environment variables are set\n# For example, by running 'gcloud auth application-default login' or setting GCLOUD_PROJECT\n\nproject_id = project.get_project_id()\nif project_id:\n    print(f\"Google Cloud Project ID: {project_id}\")\nelse:\n    print(\"Could not retrieve Google Cloud Project ID. Is gcloud SDK configured or GCLOUD_PROJECT env var set?\")\n\naccess_token = token.get_access_token()\nif access_token:\n    print(f\"Google Cloud Access Token (first 10 chars): {access_token[:10]}...\")\nelse:\n    print(\"Could not retrieve Google Cloud Access Token. Is gcloud SDK authenticated?\")","lang":"python","description":"This quickstart demonstrates how to retrieve the Google Cloud project ID and an access token using the library. These functions attempt to read from environment variables (e.g., `GCLOUD_PROJECT`), the `gcloud` CLI configuration, and the Google Cloud metadata server (if running on GCP)."},"warnings":[{"fix":"Upgrade to version 0.0.12 or later (`pip install --upgrade google-cloud-jupyter-config`) to ensure tokens are refreshed automatically.","message":"Prior to version 0.0.12, Jupyter sessions integrated with this library could experience authentication token expiration during long-running connections, leading to interrupted workflows.","severity":"gotcha","affected_versions":"<0.0.12"},{"fix":"Ensure the Google Cloud SDK is installed and initialized (e.g., `gcloud init`). Authenticate with `gcloud auth login` or `gcloud auth application-default login` for appropriate credentials.","message":"The library heavily relies on the Google Cloud SDK (gcloud CLI) being installed and correctly configured and authenticated on the system where Jupyter is running. Without it, many utility functions may return `None` or fail.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always install specific `google-cloud-*` packages like `google-cloud-jupyter-config` directly, rather than the deprecated `google-cloud` package.","message":"The root `google-cloud` PyPI package is deprecated. Users should install product-specific client libraries like `google-cloud-jupyter-config` instead of the umbrella package.","severity":"deprecated","affected_versions":"N/A (affects `google-cloud` not this specific library)"}],"env_vars":null,"search_vec":"'0.0.12':66 'access':53 'applic':50 'auth':87 'authent':60 'broader':76 'cli':31 'cloud':2,7,28,34,83 'config':4,9 'configur':22,86 'current':63 'design':39 'detail':55 'direct':24 'enabl':51 'environ':19 'extens':48,79 'gcloud':30,88 'gcp':84 'googl':1,6,27,33,82 'google-cloud':81 'google-cloud-jupyter-config':5 'helper':44 'id':58 'inform':23 'infrequ':70 'jupyt':3,8,18,47,78,85 'jupyter-extens':77 'librari':13 'like':56 'metadata':35 'often':72 'project':57,80 'provid':15 'python':12 'releas':68 'retriev':21 'reusabl':43 'sdk':29 'seamless':52 'server':36 'tie':73 'token':61 'util':16 'version':64","created_at":"2026-04-16T18:48:02.915235+00:00","updated_at":"2026-04-16T18:48:02.915235+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'project' from 'google.cloud.jupyter_config' (/tmp/tmptkvadfqv/venv/lib/python3.12/site-packages/google/cloud/jupyter_config/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.0.13","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/GoogleCloudPlatform/jupyter-extensions","docs":null,"changelog":null,"pypi":"https://pypi.org/project/google-cloud-jupyter-config/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["gcp","type-stubs"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}