{"id":5945,"library":"google-cloud-common","title":"Google Cloud Common API client library","description":"google-cloud-common is a foundational Python library that provides generated Python types and common helpers for other Google Cloud client libraries. It is not typically used as a standalone application client but serves as an internal dependency for service-specific client libraries within the `google-cloud-python` ecosystem. The current version is 1.9.0. It is actively maintained as part of the broader Google Cloud Python client libraries, which have a frequent release cadence.","status":"active","version":"1.9.0","language":"python","source_language":"en","source_url":"https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-common","tags":["google-cloud","utility","client-library","protobuf","types","foundational"],"install":[{"cmd":"pip install google-cloud-common","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Provides core functionality for Google API clients, including retry mechanisms and pagination.","package":"google-api-core"},{"reason":"Facilitates Pythonic representation of Protocol Buffer messages.","package":"proto-plus"},{"reason":"Core library for Google's Protocol Buffers, used for data serialization.","package":"protobuf"}],"imports":[{"note":"google-cloud-common provides generated types and helpers. It is not designed for direct interaction by end-users to perform service operations. Instead, it underpins other service-specific client libraries.","symbol":"google.cloud.common","correct":"This library is primarily an internal dependency; direct end-user imports for functional use are rare. Its components are typically consumed by other `google-cloud-*` client libraries."}],"quickstart":{"code":"import os\nfrom google.cloud import storage\n\n# This example uses google-cloud-storage, which relies on common infrastructure\n# like that provided by google-cloud-common for its base functionality and types.\n# Ensure GOOGLE_APPLICATION_CREDENTIALS environment variable is set\n# or running in a Google Cloud environment with default credentials.\n# For local development, set GOOGLE_APPLICATION_CREDENTIALS to the path of your service account key file.\n# os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '/path/to/your/key.json'\n\ntry:\n    # Initialize a client for Google Cloud Storage\n    # This implicitly uses authentication mechanisms supported by google-cloud-common's underlying components.\n    client = storage.Client()\n    \n    # Attempt to list buckets to verify authentication and client setup\n    buckets = list(client.list_buckets())\n    print(f\"Successfully listed {len(buckets)} buckets.\")\n    if buckets:\n        print(f\"First bucket: {buckets[0].name}\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n    print(\"Please ensure your Google Cloud environment is set up and authenticated.\")\n    print(\"  - Set GOOGLE_APPLICATION_CREDENTIALS to your service account key file path, or\")\n    print(\"  - Run in a Google Cloud environment (e.g., Cloud Shell, GCE, Cloud Run).\")\n","lang":"python","description":"Since `google-cloud-common` primarily provides foundational types and helpers, it does not have a typical 'hello world' for direct use. This quickstart demonstrates how to set up and use a common Google Cloud client library (Google Cloud Storage) which relies on the common infrastructure provided by `google-cloud-common` for authentication and core functionality. This ensures your environment is correctly configured to use Google Cloud Python client libraries."},"warnings":[{"fix":"For interacting with a specific Google Cloud service, install and use the client library for that service (e.g., `pip install google-cloud-storage` and `from google.cloud import storage`).","message":"google-cloud-common is an internal dependency and provides generated Python types and common helpers. It is not intended for direct use by end-users for performing Google Cloud service operations. Instead, it is a building block for other service-specific client libraries (e.g., `google-cloud-storage`, `google-cloud-pubsub`).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always check the `Requires-Python` metadata on PyPI for the specific version of `google-cloud-common` you intend to use. Google Cloud recommends keeping your Python environment updated to actively supported versions (currently Python 3.9+ for `google-cloud-common`, but trending towards 3.10+ for the ecosystem) to ensure continued compatibility and receive critical updates.","message":"While `google-cloud-common==1.9.0` currently supports Python >=3.9, the broader Google Cloud Python client library ecosystem is actively dropping support for older Python versions. For example, `pandas-gbq` recently dropped Python 3.9 support in `v0.35.0` (released 2026-04-09), requiring Python 3.10+.","severity":"breaking","affected_versions":"Future minor/major versions of `google-cloud-common` are highly likely to drop support for Python 3.9 and potentially 3.10 as they reach end-of-life."},{"fix":"Take care to restrict access to logs if they are saved. To enable default logging without code changes, set the `GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable. To propagate logs to the root logger for custom handling, explicitly set `logging.getLogger('google').propagate = True` in your application code.","message":"The library utilizes standard Python logging functionality. Logs may contain sensitive information. By default, logging events from `google-cloud-common` (and other `google` namespace loggers) are not propagated up to the root logger.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'1.9.0':63 'activ':66 'api':4 'applic':38 'broader':72 'cadenc':83 'client':5,28,39,50,76,89 'client-librari':88 'cloud':2,9,27,56,74,86 'common':3,10,22 'current':60 'depend':45 'ecosystem':58 'foundat':13,93 'frequent':81 'generat':18 'googl':1,8,26,55,73,85 'google-cloud':84 'google-cloud-common':7 'google-cloud-python':54 'helper':23 'intern':44 'librari':6,15,29,51,77,90 'maintain':67 'part':69 'protobuf':91 'provid':17 'python':14,19,57,75 'releas':82 'serv':41 'servic':48 'service-specif':47 'specif':49 'standalon':37 'type':20,92 'typic':33 'use':34 'util':87 'version':61 'within':52","created_at":"2026-04-14T18:35:15.406445+00:00","updated_at":"2026-04-16T15:20:43.045924+00:00","problems":{"verify_error":"no import statement found"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.10.0","cli_name":"","cli_version":null,"type":"library","homepage":"https://cloud.google.com/python","github":"https://github.com/googleapis/google-cloud-python","docs":null,"changelog":null,"pypi":"https://pypi.org/project/google-cloud-common/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["gcp","type-stubs"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"skip","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-05","install_tag":null}}