Skip to main content

Google Cloud Resource Manager API client library

Project description

alpha pypi versions

Google Cloud Resource Manager API provides methods that you can use to programmatically manage your projects in the Google Cloud Platform. With this API, you can do the following:


Don’t forget to look at the Authentication section below. It’s slightly different from the rest of this library.

Quick Start

In order to use this library, you first need to go through the following steps:

  1. Select or create a Cloud Platform project.
  2. Enable billing for your project.
  3. Enable the Google Cloud Resource Manager API.


Install this library in a virtualenv using pip. virtualenv is a tool to create isolated Python environments. The basic problem it addresses is one of dependencies and versions, and indirectly permissions.

With virtualenv, it’s possible to install this library without needing system install permissions, and without clashing with the installed system dependencies.

Supported Python Versions

Python >= 3.5

Deprecated Python Versions

Python == 2.7. Python 2.7 support will be removed on January 1, 2020.


pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install google-cloud-resource-manager


pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\pip.exe install google-cloud-resource-manager


Unlike the other APIs, the Resource Manager API is focused on managing your various projects inside Google Cloud Platform. What this means (currently, as of August 2015) is that you can’t use a Service Account to work with some parts of this API (for example, creating projects).

The reason is actually pretty simple: if your API call is trying to do something like create a project, what project’s Service Account can you use? Currently none.

This means that for this API you should always use the credentials provided by the Google Cloud SDK, which you can get by running gcloud auth login.

Once you run that command, google-cloud-python will automatically pick up the credentials, and you can use the “automatic discovery” feature of the library.

Start by authenticating:

$ gcloud auth application-default login

And then simply create a client:

from import resource_manager
client = resource_manager.Client()

Using the API

Here’s a quick example of the full life-cycle:

from import resource_manager

client = resource_manager.Client()

# List all projects you have access to
for project in client.list_projects():

# Create a new project
new_project = client.new_project(
 'your-project-id-here', name='My new project')

# Update an existing project
project = client.fetch_project('my-existing-project') = 'Modified name'

# Delete a project
project = client.new_project('my-existing-project')

# Undelete a project
project = client.new_project('my-existing-project')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for google-cloud-resource-manager, version 0.30.3
Filename, size File type Python version Upload date Hashes
Filename, size google_cloud_resource_manager-0.30.3-py2.py3-none-any.whl (15.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size google-cloud-resource-manager-0.30.3.tar.gz (19.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page