gcloud-rest-auth
Python Client for Google Cloud Auth
What it is and what it does
gcloud-rest-auth is a Python client library for authenticating with Google Cloud Platform services. It abstracts away the complexity of GCP credential management by providing a Token class that handles multiple authentication methods—service accounts, user credentials, GCE metadata, impersonated service accounts, and workload identity federation—and manages token lifecycle including refresh. The library also provides specialized classes like IamClient for interacting with GCP public keys and URL signing, and IapToken for securing access to Identity-Aware Proxy protected services.
The package is designed to integrate with other gcloud-rest-* components, allowing you to define authentication once and reuse it across multiple GCP service clients. It supports both asyncio and threadsafe execution models, making it suitable for concurrent applications. With active maintenance, no known vulnerabilities, and a permissive MIT license, it's a stable choice for applications that need reliable GCP authentication without managing credentials manually.
Use it for:
- Authenticate a Python application against GCP services using a service account JSON file.
- Implement workload identity federation for applications running outside GCP (e.g., on-premises or other clouds).
- Authorize requests to an Identity-Aware Proxy protected GCP service using IAP tokens.
- Build a multi-tenant application where each tenant uses impersonated service account credentials.
- Manage token refresh automatically in a long-running async application accessing multiple GCP services.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python client libraries for Google Cloud authentication, supporting service accounts, user credentials, GCE metadata, impersonated accounts, and workload identity federation via asyncio or threadsafe interfaces.
Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and offers low-friction installation. It solves a real problem—GCP credential management—across multiple authentication methods and execution models. Suitable for production use in applications that need reliable, flexible authentication with Google Cloud.
Install
gcloud-rest-auth on PyPI
pip
pip install gcloud-rest-authuv
uv add gcloud-rest-authpoetry
poetry add gcloud-rest-authInstalling gcloud-rest-auth
Before you install
Low friction installation with a pure Python wheel. Active maintenance with a release 28 days ago and recent commits. Depends on standard libraries (requests, cryptography, pyjwt, tenacity, chardet) with no compiled dependencies.
License in practice
MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute this package freely provided you include the license notice.
Quickstart
pip install gcloud-rest-auth
from gcloud_rest_auth import Token
token = Token(service_account_credentials)
await token.get() # or token.get() in threadsafe mode
Requires Python 3.10 or later. GCP credentials (service account JSON, user credentials, or GCE metadata) must be available at runtime.
Verify before relying
- Whether the package supports both asyncio and threadsafe modes simultaneously or requires choosing one at install time.
- Performance characteristics when handling token refresh under high concurrency.
- Whether external account credentials work with all GCP services or have known limitations.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — chardet, cryptography, pyjwt, requests, tenacity |
| Maintenance | actively maintained — 28 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 604,952/month — #5,802 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gcloud_rest_auth-5.5.0-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
coze-workload-identityImplements OAuth2.0 token exchange…
permissive · top 15,000 on PyPI
gcloud-aio-authProvides asyncio-compatible and threadsafe…
permissive · top 1,000 on PyPI
spiffeProvides Python bindings to the SPIFFE Workload…
permissive · top 15,000 on PyPI
gcloud-rest-datastoreProvides an asyncio-compatible or threadsafe…
permissive · top 15,000 on PyPI
gcloud-rest-taskqueueAsyncio and threadsafe Python client for Google…
permissive · top 15,000 on PyPI
gcloud-aio-storageProvides an asyncio-based Python client for…
permissive · top 1,000 on PyPI
gcloud-rest-bigqueryProvides an asyncio or threadsafe Python client…
permissive · top 15,000 on PyPI
akeyless-cloud-idRetrieves cloud identity tokens from AWS, GCP,…
permissive · top 5,000 on PyPI
gcloud-aio-datastoreAsyncio and threadsafe Python client for Google…
permissive · top 15,000 on PyPI
igwn-auth-utilsDiscovers and deserializes X.509 credentials…
permissive · top 15,000 on PyPI