Registry / gcp / google-cloud-monitoring-dashboards

google-cloud-monitoring-dashboards

JSON →
library2.21.0pypypiunverified

The `google-cloud-monitoring-dashboards` client library provides Python access to the Google Cloud Monitoring Dashboards API. It allows programmatic creation, management, and listing of custom dashboards for visualizing metrics in Google Cloud Monitoring. Part of the larger `google-cloud-python` monorepo, it receives frequent updates alongside other Google Cloud client libraries.

pip install google-cloud-monitoring-dashboards
INSTALL
IMPORT
SIG · GOOGLE-CLOUD-MONIT
G
google-cloud-monitoring-dashboards
gcppythonv2.21.0
Install
5.5s avg
Import
Disk
67MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.21.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 68.7MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 5.5s · import 0.000s · 67MB
67MB installed
● package 67MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DashboardsServiceClient
from google.cloud import monitoring_dashboards_v1
from google.cloud import monitoring_dashboards

Initializes the Monitoring Dashboards client and lists the first 5 dashboards in a specified Google Cloud project. Requires `GOOGLE_CLOUD_PROJECT_ID` environment variable or direct replacement of 'your-gcp-project-id'.

import os from google.cloud import monitoring_dashboards_v1 # Set your Google Cloud Project ID project_id = os.environ.get("GOOGLE_CLOUD_PROJECT_ID", "your-gcp-project-id") try: # Initialize the client client = monitoring_dashboards_v1.DashboardsServiceClient() # The parent resource name for listing dashboards parent = f"projects/{project_id}" print(f"Listing up to 5 dashboards for project: {project_id}") # Iterate over and print dashboard display names for dashboard in client.list_dashboards(request={"parent": parent}, page_size=5): print(f" - {dashboard.display_name} (ID: {dashboard.name.split('/')[-1]})") except Exception as e: print(f"An error occurred: {e}") print("\nEnsure you have authenticated (e.g., `gcloud auth application-default login` or set `GOOGLE_APPLICATION_CREDENTIALS`) and provided a valid project ID.")
Debug
Known issues
gotchaGoogle Cloud client libraries expect specific authentication. If not configured, you'll encounter 'PermissionDenied' errors.
fix
Authenticate using `gcloud auth application-default login` for local development or set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to a service account key file path for production/CI.
affects: All versions
gotchaMany methods require a `project_id` or a fully qualified resource name (e.g., `projects/PROJECT_ID`). Misformed or missing project IDs lead to `NotFound` or `InvalidArgument` errors.
fix
Always ensure the correct Google Cloud project ID is provided, often in the `parent` argument of requests, and that resource names follow the API's expected format (e.g., `projects/{project_id}/dashboards/{dashboard_id}`).
affects: All versions
breakingOlder versions of Google Cloud client libraries might drop support for End-of-Life Python versions. Ensure your environment uses a supported Python version.
fix
The current version requires Python >=3.9. Upgrade your Python environment to 3.9 or higher if you encounter installation issues or runtime errors related to unsupported Python versions. Check `requires_python` in `setup.py` or PyPI metadata for exact requirements.
affects: <=2.x.x
Upgrade
Version history
2.21.0latest on PyPI · released Mar 26, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
18
OpenAI (training)
2
Resources
google-cloud-monitoring-dashboards — pip install google-cloud-monitoring-dashboards · libregistry