Registry / gcp / google-cloud-appengine-admin

google-cloud-appengine-admin

JSON →
library1.18.0pypypi✓ verified 21d ago

The `google-cloud-appengine-admin` client library for Python allows developers to programmatically manage their Google App Engine applications, including services, versions, instances, and certificates. It is an actively maintained, stable client, part of the larger `google-cloud-python` monorepo, receiving regular updates. The current version is 1.17.0, and it adheres to Google Cloud's client library release cadence.

pip install google-cloud-appengine-admin
INSTALL
IMPORT
SIG · GOOGLE-CLOUD-APPEN
G
google-cloud-appengine-admin
gcppythonv1.18.0
Install
5.6s avg
Import
1635ms
Disk
70MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.18.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.958s · 71.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.6s · import 1.312s · 70MB
70MB installed
● package 70MB
Code
Verified usage

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

AppEngineAdminClient
from google.cloud import appengine_admin_v1
from google.cloud.appengine_admin import AppEngineAdminClient
For explicit versioning, it's recommended to import from `appengine_admin_v1` to ensure you are using the v1 API.
types
from google.cloud.appengine_admin_v1 import types
Accesses specific API message types, like `types.Application` or `types.Service`.

This quickstart demonstrates how to initialize the `AppEngineAdminClient` and list all App Engine applications associated with your Google Cloud project. It relies on standard Google Cloud authentication mechanisms (e.g., `GOOGLE_APPLICATION_CREDENTIALS` environment variable or default credentials). Ensure the App Engine Admin API is enabled in your project and the authenticated principal has the necessary permissions (e.g., `roles/appengine.appAdmin`).

import os from google.cloud import appengine_admin_v1 # Ensure GOOGLE_CLOUD_PROJECT environment variable is set # For local development, ensure GOOGLE_APPLICATION_CREDENTIALS is set # or a service account key is available and has necessary permissions (e.g., App Engine Admin). project_id = os.environ.get("GOOGLE_CLOUD_PROJECT", "your-gcp-project-id") def list_app_engine_applications(project_id: str): """Lists all App Engine applications in the specified project.""" if project_id == "your-gcp-project-id": print("Please set the GOOGLE_CLOUD_PROJECT environment variable or replace 'your-gcp-project-id' with your actual project ID.") return try: # Create a client client = appengine_admin_v1.AppEngineAdminClient() # The `list_applications` method lists applications associated with the authenticated project. applications = client.list_applications() print(f"App Engine Applications in project '{project_id}':") found_any = False for app in applications: print(f"- {app.name} (ID: {app.id}) - Auth Domain: {app.auth_domain})") found_any = True if not found_any: print("No applications found or the App Engine Admin API is not enabled/permissions are insufficient.") except Exception as e: print(f"An error occurred: {e}") print("Ensure the 'App Engine Admin API' is enabled in your GCP project and your credentials have sufficient permissions (e.g., App Engine Admin role).") if __name__ == "__main__": list_app_engine_applications(project_id)
Debug
Known issues
breakingPython 2.x and older Python 3.x versions are no longer supported. The library requires Python >= 3.9.
fix
Upgrade your Python environment to Python 3.9 or newer. Consider migrating App Engine applications from Python 2.7 to Python 3 runtimes as older runtimes are being deprecated.
affects: <1.17.0 (for Python <3.9)
gotchaAuthentication and authorization are critical. You must enable the App Engine Admin API in your GCP project and provide credentials with appropriate permissions (e.g., `roles/appengine.appAdmin` or `roles/owner`). Additionally, specific OAuth 2.0 scopes like `https://www.googleapis.com/auth/appengine.admin` may be required.
fix
Ensure the App Engine Admin API is enabled in the Google Cloud Console. Use `GOOGLE_APPLICATION_CREDENTIALS` for service account keys or configure `gcloud` for user authentication. Grant the necessary IAM roles to your service account or user.
affects: All
deprecatedThe underlying Google App Engine Gen 1 runtimes (e.g., Python 2.7, Java 8) are being deprecated and will no longer be supported after January 31, 2026. While the client library may still function, deployments on these runtimes will cease, and security updates will stop.
fix
Migrate your App Engine applications to newer, supported runtimes (e.g., Python 3). This is an App Engine platform-level change, not directly a client library breaking change, but critical for users managing App Engine applications.
affects: App Engine applications on Gen 1 runtimes
gotchaGoogle Cloud resources often use specific 'resource name' formats (e.g., `projects/PROJECT_ID/locations/LOCATION_ID/applications/APPLICATION_ID`). Ensure you construct these names correctly when making API calls that require them.
fix
Refer to the client library documentation for the exact format of resource names required by each method (e.g., `client.get_application(name='apps/' + project_id)`).
affects: All
gotchaWhen deploying Python applications to App Engine Standard environment, vendoring dependencies using `pip install -t lib/` can lead to dependency conflicts if not handled carefully, especially when multiple `google-cloud-` libraries share namespaces.
fix
Ensure all `google-cloud-` dependencies are installed together using a single `pip install -t lib/ -r requirements.txt` command and start with an empty `lib/` directory. For App Engine Flexible, dependencies are installed automatically from `requirements.txt`.
affects: App Engine Standard deployments
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'google.cloud'
The `google-cloud-appengine-admin` client library or its fundamental `google-cloud-core` dependencies are not installed in your Python environment or are not accessible via your PYTHONPATH.
fix
Ensure the library is installed using pip: `pip install google-cloud-appengine-admin` and verify your Python environment path.
google.api_core.exceptions.PermissionDenied: 403 The caller does not have permission
The authenticated service account or user lacks the necessary Identity and Access Management (IAM) permissions to perform the requested operation on the Google App Engine resource.
fix
Grant the required IAM roles (e.g., `App Engine Admin`, `App Engine Deployer`, `Owner`, or specific permissions like `appengine.applications.create`) to the service account or user performing the operation.
ERROR: (gcloud.app.deploy) Error Response: [13] Failed to create cloud build: ... service account YOUR_PROJECT_ID@appspot.gserviceaccount.com does not have access to the bucket.
During deployment, the App Engine default service account (or the specified service account) lacks permission to access the Cloud Storage bucket used for staging build artifacts, which is a common requirement for Cloud Build.
fix
Grant the `Storage Admin` role (`roles/storage.admin`) or `Storage Object Admin` role (`roles/storage.objectAdmin`) to the App Engine default service account (e.g., `YOUR_PROJECT_ID@appspot.gserviceaccount.com`).
google.api_core.exceptions.InvalidArgument: 400 Request contains an invalid argument.
The request to the App Engine Admin API includes an invalid or malformed argument, such as an incorrectly formatted resource name, an out-of-range value, or a parameter that does not meet API specifications.
fix
Review the documentation for the specific App Engine Admin API method being called and ensure all arguments are correctly formatted, within valid ranges, and adhere to expected patterns (e.g., project IDs, service names, version IDs). Check for typos in your code or configuration files.
Upgrade
Version history
1.18.0latest on PyPI · released Jun 3, 2026
Audit
Dependencies
google-api-corerequiredCore library for Google Cloud API clients, handles request/response, retries, etc.
google-authrequiredHandles authentication with Google Cloud services.
protobufrequiredUsed for serializing structured data.
grpciorequiredProvides the gRPC transport for API calls. Included with 'google-api-core[grpc]'.
Agent activity
31 hits · last 30 days
node
26
OpenAI (training)
1
Resources
google-cloud-appengine-admin — pip install google-cloud-appengine-admin · libregistry