Registry / gcp / google-cloud-api-keys

google-cloud-api-keys

JSON →
library0.9.0pypypi✓ verified 79d ago

Client library for the Google Cloud API Keys API, version 0.8.0. Allows you to manage and consume API keys for Google Cloud services. Part of the Google Cloud Python client libraries. Release cadence is irregular, typically monthly or as needed.

pip install google-cloud-api-keys
INSTALL
IMPORT
SIG · GOOGLE-CLOUD-API-K
G
google-cloud-api-keys
gcppythonv0.9.0
Install
5.2s avg
Import
1700ms
Disk
66MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.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.95 runs
installs and imports cleanly · install 0.0s · import 1.946s · 68.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.2s · import 1.454s · 66MB
66MB installed
● package 66MB
Code
Verified usage

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

ApiKeysClient
from google.cloud.api_keys_v2 import ApiKeysClient
from google.cloud import api_keys_v2

Basic usage: list all API keys for a GCP project. Requires a service account key or ADC set up.

import os from google.cloud import api_keys_v2 from google.cloud.api_keys_v2 import Key, OperationMetadata from google.cloud.api_keys_v2.services.api_keys.transports import ApiKeysGrpcTransport def quickstart(): client = api_keys_v2.ApiKeysClient() parent = f"projects/{os.environ.get('GOOGLE_CLOUD_PROJECT', 'my-project')}/locations/global" # List API keys request = api_keys_v2.ListKeysRequest(parent=parent) page_result = client.list_keys(request=request) for response in page_result: print(f"Key: {response.name}") if __name__ == "__main__": quickstart()
Debug
Known issues
gotchaThe import path is `google.cloud.api_keys_v2`, not `google.cloud.apikeys` or `google.cloud.api_keys`. The underscore between `api` and `keys` is part of the module name.
fix
Use `from google.cloud import api_keys_v2`.
affects: all
gotchaThe client constructor expects a `credentials` argument if you aren't using Application Default Credentials (ADC). Many users assume it auto-discovers, but if ADC is not set, you must pass `credentials` explicitly.
fix
Provide credentials via `google.auth.default()` or use a service account key file with `os.environ['GOOGLE_APPLICATION_CREDENTIALS']`.
affects: all
gotchaThe `parent` path for keys is `projects/{project}/locations/global`. Forgetting `locations/global` causes a 404 error.
fix
Always include `locations/global` in the parent path.
affects: all
Upgrade
Version history
0.9.0latest on PyPI · released Jun 3, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
38 hits · last 30 days
node
32
OpenAI (training)
1
Resources
google-cloud-api-keys — pip install google-cloud-api-keys · libregistry