skillfed

gcloud-rest-auth

Python Client for Google Cloud Auth

gcloud-rest-auth v5.5.0 605.0K downloads/30d#5,802 on PyPI348
Permissive license MIT Active released

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-auth

uv

uv add gcloud-rest-auth

poetry

poetry add gcloud-rest-auth

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet

Tags

google cloud authentication pythongcp service account clientidentity-aware proxy tokengoogle cloud credentials libraryasync google authgcp iam clientworkload identity federation
gcp-authworkload-identityasync-ready

More Internet packages

botocore

Botocore provides low-level, data-driven access…

permissive · top 100 on PyPI

aiobotocore

Provides an async client for AWS services using…

permissive · top 100 on PyPI

pydantic

Pydantic validates Python data structures…

permissive · top 100 on PyPI

filelock

Provides a platform-independent file locking…

permissive · top 100 on PyPI

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

googleapis-common-protos

Provides common Protocol Buffer message…

permissive · top 100 on PyPI

coze-workload-identity

Implements OAuth2.0 token exchange…

permissive · top 15,000 on PyPI

gcloud-aio-auth

Provides asyncio-compatible and threadsafe…

permissive · top 1,000 on PyPI

spiffe

Provides Python bindings to the SPIFFE Workload…

permissive · top 15,000 on PyPI

gcloud-rest-datastore

Provides an asyncio-compatible or threadsafe…

permissive · top 15,000 on PyPI

gcloud-rest-taskqueue

Asyncio and threadsafe Python client for Google…

permissive · top 15,000 on PyPI

gcloud-aio-storage

Provides an asyncio-based Python client for…

permissive · top 1,000 on PyPI

gcloud-rest-bigquery

Provides an asyncio or threadsafe Python client…

permissive · top 15,000 on PyPI

akeyless-cloud-id

Retrieves cloud identity tokens from AWS, GCP,…

permissive · top 5,000 on PyPI

gcloud-aio-datastore

Asyncio and threadsafe Python client for Google…

permissive · top 15,000 on PyPI

igwn-auth-utils

Discovers and deserializes X.509 credentials…

permissive · top 15,000 on PyPI