Remove oauth2client from docs (#738)

* Use google-auth and google-auth-oauthlib in oauth2 docs.

* Remove basic server sample
diff --git a/docs/README.md b/docs/README.md
index 0bdda21..129a60a 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -7,8 +7,7 @@
 ## Features
 
 - Call Google APIs simply
-- Use the library with Google App Engine
-- Handle Auath with fewer lines of code
+- Handle Auth with fewer lines of code
 - Use standard tooling for installation
 
 ## Documentation
@@ -32,8 +31,6 @@
   - [Use Pagination](pagination.md)
   - [Improve Performance](performance.md)
   - [Understand Thread Safety](thread_safety.md)
-  - [Use Google App Engine](google_app_engine.md)
-  - [Use Django](django.md)
 
 ### Reference Documentation
 
diff --git a/docs/api-keys.md b/docs/api-keys.md
index 10693a5..40adf76 100644
--- a/docs/api-keys.md
+++ b/docs/api-keys.md
@@ -2,7 +2,7 @@
 
 When calling APIs that do not access private user data, you can use simple API keys. These keys are used to authenticate your application for accounting purposes. The Google Developers Console documentation also describes [API keys](https://developers.google.com/console/help/using-keys).
 
-> Note: If you do need to access private user data, you must use OAuth 2.0. See [Using OAuth 2.0 for Web Server Applications](oauth-web.md) and [Using OAuth 2.0 for Server to Server Applications](oauth-server.md) for more information.
+> Note: If you do need to access private user data, you must use OAuth 2.0. See [Using OAuth 2.0 for Installed Applications](oauth-installed.md), [Using OAuth 2.0 for Server to Server Applications](oauth-server.md), and [Using OAuth 2.0 for Web Server Applications](oauth-web.md) for more information.
 
 ## Using API Keys
 
diff --git a/docs/client-secrets.md b/docs/client-secrets.md
index 9a53882..fa7caad 100644
--- a/docs/client-secrets.md
+++ b/docs/client-secrets.md
@@ -2,6 +2,8 @@
 
 The Google APIs Client Library for Python uses the `client_secrets.json` file format for storing the `client_id`, `client_secret`, and other OAuth 2.0 parameters.
 
+See [Creating authorization credentials](https://developers.google.com/identity/protocols/OAuth2WebServer#creatingcred) for how to obtain a `client_secrets.json` file.
+
 The `client_secrets.json` file format is a [JSON](http://www.json.org/) formatted file containing the client ID, client secret, and other OAuth 2.0 parameters. Here is an example client_secrets.json file for a web application:
 
 ```json
@@ -53,7 +55,7 @@
 
 ### Installed App
 
-```py
+```python
 from google_auth_oauthlib.flow import InstalledAppFlow
 ...
 flow = InstalledAppFlow.from_client_secrets_file(
@@ -63,7 +65,7 @@
 
 ### Web Server App
 
-```py
+```python
 import google.oauth2.credentials
 import google_auth_oauthlib.flow
 
diff --git a/docs/django.md b/docs/django.md
deleted file mode 100644
index 1f676be..0000000
--- a/docs/django.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# Using Django
-
-The Google APIs Client Library for Python has special support for the [Django](https://www.djangoproject.com/) web framework. In particular, there are classes that simplify the OAuth 2.0 protocol steps. This document describes the Django-specific classes available for working with [Flow](https://developers.google.com/api-client-library/python/guide/aaa_oauth#flows), [Credentials](https://developers.google.com/api-client-library/python/guide/aaa_oauth#credentials), and [Storage](https://developers.google.com/api-client-library/python/guide/aaa_oauth#storage) objects.
-
-## Flows
-
-Use the [oauth2client.contrib.django\_orm.FlowField](https://oauth2client.readthedocs.io/en/latest/source/oauth2client.contrib.django_orm.html#oauth2client.contrib.django_orm.FlowField) class as a Django model field so that `Flow` objects can easily be stored. When your application is simultaneously going through OAuth 2.0 steps for many users, it's normally best to store per-user `Flow` objects before the first redirection. This way, your redirection handlers can retrieve the `Flow` object already created for the user. In the following code, a model is defined that allows `Flow` objects to be stored and keyed by `User`:
-
-```py
-from django.contrib.auth.models import User
-from django.db import models
-from oauth2client.contrib.django_orm import FlowField
-...
-class FlowModel(models.Model):
-  id = models.ForeignKey(User, primary_key=True)
-  flow = FlowField()
-```
-
-## Credentials
-
-Use the [oauth2client.contrib.django\_orm.CredentialsField](https://oauth2client.readthedocs.io/en/latest/source/oauth2client.contrib.django_orm.html#oauth2client.contrib.django_orm.CredentialsField) class as a Django model field so that `Credentials` objects can easily be stored. Similar to `Flow` objects, it's normally best to store per-user `Credentials` objects. In the following code, a model is defined that allows `Credentials` objects to be stored and keyed by `User`:
-
-```py
-from django.contrib.auth.models import User
-from django.db import models
-from oauth2client.contrib.django_orm import CredentialsField
-...
-class CredentialsModel(models.Model):
-  id = models.ForeignKey(User, primary_key=True)
-  credential = CredentialsField()
-```
-
-## Storage
-
-Use the [oauth2client.contrib.django\_orm.Storage](https://oauth2client.readthedocs.io/en/latest/source/oauth2client.contrib.django_orm.html#oauth2client.contrib.django_orm.Storage) class to store and retrieve `Credentials` objects using a model defined with a `CredentialsField` object. You pass the model, field name for the model key, value for the model key, and field name to the `CredentialsField` constructor. The following shows how to create, read, and write `Credentials` objects using the example `CredentialsModel` class above:
-
-```py
-from django.contrib.auth.models import User
-from oauth2client.contrib.django_orm import Storage
-from your_project.your_app.models import CredentialsModel
-...
-user = # A User object usually obtained from request.
-storage = Storage(CredentialsModel, 'id', user, 'credential')
-credential = storage.get()
-...
-storage.put(credential)
-```
diff --git a/docs/google_app_engine.md b/docs/google_app_engine.md
deleted file mode 100644
index c261ed8..0000000
--- a/docs/google_app_engine.md
+++ /dev/null
@@ -1,149 +0,0 @@
-# Using Google App Engine
-
-The Google APIs Client Library for Python has special support for [Google App Engine](https://developers.google.com/appengine) applications. In particular, there are decorators and classes that simplify the OAuth 2.0 protocol steps. Before reading this page, you should be familiar with the content on this library's [OAuth 2.0](https://developers.google.com/api-client-library/python/guide/aaa_oauth) page.
-
-## Decorators
-
-The easiest way to handle OAuth 2.0 is to use the App Engine [Python decorators](http://en.wikipedia.org/wiki/Python_syntax_and_semantics#Decorators) supplied by this library. These decorators handle all of the OAuth 2.0 steps without you having to use any `Flow`, `Credentials`, or `Storage` objects.
-
-There are two decorator classes to choose from:
-
-*   **OAuth2Decorator**: Use the [OAuth2Decorator](https://oauth2client.readthedocs.io/en/latest/source/oauth2client.contrib.appengine.html#oauth2client.contrib.appengine.OAuth2Decorator) class to contruct a decorator with your client ID and secret.
-*   **OAuth2DecoratorFromClientSecrets**: Use the [OAuth2DecoratorFromClientSecrets](https://oauth2client.readthedocs.io/en/latest/source/oauth2client.contrib.appengine.html#oauth2client.contrib.appengine.OAuth2DecoratorFromClientSecrets) class to contruct a decorator using a `client_secrets.json` file described in the [flow\_from\_clientsecrets()](https://developers.google.com/api-client-library/python/guide/aaa_oauth#flow_from_clientsecrets) section of the OAuth 2.0 page.
-
-There are also two decorator types to choose from:
-
-*   **oauth\_required**: Any method decorated with `oauth_required` completes all OAuth 2.0 steps before entering the function. Within the body of the function, you can use the decorator's `http()` function to get an `Http` object that has already been authorized.
-*   **oauth\_aware**: This decorator type requires a little more code than `oauth_required`, but it is preferred because it gives you control over the user experience. For example, you can display a page explaining why the user is being redirected to an authorization server. This decorator does not perform any OAuth 2.0 steps, but within the body of the decorated function you can call these convenient decorator functions:
-    *   **has\_credentials()**: Returns `True` if there are valid access credentials for the logged in user.
-    *   **authorize\_url()**: Returns the first URL that starts the OAuth 2.0 steps.
-
-When using these decorators, you need to add a specific URL handler to your application to handle the redirection from the authorization server back to your application. This handler takes care of the final OAuth 2.0 steps required to finish authorization, and it redirects the user back to the original path where your application first detected that authorization was needed.
-
-```py
-def main():
-  application = webapp.WSGIApplication(
-    [
-      ('/', MainHandler),
-      ('/about', AboutHandler),
-      (decorator.callback_path, decorator.callback_handler()),
-    ],
-    debug=True)
-  run_wsgi_app(application)
-```
-
-In the following code snippet, the `OAuth2Decorator` class is used to create an `oauth_required` decorator, and the decorator is applied to a function that accesses the [Google Calendar API](https://developers.google.com/google-apps/calendar/):
-
-```py
-from apiclient.discovery import build
-from google.appengine.ext import webapp
-from oauth2client.contrib.appengine import OAuth2Decorator
-
-decorator = OAuth2Decorator(
-  client_id='your_client_id',
-  client_secret='your_client_secret',
-  scope='https://www.googleapis.com/auth/calendar')
-
-service = build('calendar', 'v3')
-
-class MainHandler(webapp.RequestHandler):
-
-  @decorator.oauth_required
-  def get(self):
-    # Get the authorized Http object created by the decorator.
-    http = decorator.http()
-    # Call the service using the authorized Http object.
-    request = service.events().list(calendarId='primary')
-    response = request.execute(http=http)
-    ...
-```
-
-In the following code snippet, the `OAuth2DecoratorFromClientSecrets` class is used to create an `oauth_aware` decorator, and the decorator is applied to a function that accesses the [Google Tasks API](https://developers.google.com/google-apps/tasks/):
-
-```py
-import os
-from apiclient.discovery import build
-from google.appengine.ext import webapp
-from oauth2client.contrib.appengine import OAuth2DecoratorFromClientSecrets
-
-decorator = OAuth2DecoratorFromClientSecrets(
-  os.path.join(os.path.dirname(__file__), 'client_secrets.json'),
-  'https://www.googleapis.com/auth/tasks.readonly')
-
-service = build('tasks', 'v1')
-
-class MainHandler(webapp.RequestHandler):
-
-  @decorator.oauth_aware
-  def get(self):
-    if decorator.has_credentials():
-      response = service.tasks().list(tasklist='@default').execute(decorator.http())
-      # Write the task data
-      ...
-    else:
-      url = decorator.authorize_url()
-      # Write a page explaining why authorization is needed,
-      # and provide the user with a link to the url to proceed.
-      # When the user authorizes, they get redirected back to this path,
-      # and has_credentials() returns True.
-      ...
-```
-
-## Service Accounts
-
-If your App Engine application needs to call an API to access data owned by the application's project, you can simplify OAuth 2.0 by using [Service Accounts](https://developers.google.com/accounts/docs/OAuth2ServiceAccount). These server-to-server interactions do not involve a user, and only your application needs to authenticate itself. Use the [AppAssertionCredentials](https://oauth2client.readthedocs.io/en/latest/source/oauth2client.contrib.appengine.html#oauth2client.contrib.appengine.AppAssertionCredentials) class to create a `Credentials` object without using a `Flow` object.
-
-In the following code snippet, a `Credentials` object is created and an `Http` object is authorized:
-
-import httplib2from google.appengine.api import memcachefrom oauth2client.contrib.appengine import  AppAssertionCredentials  
-...credentials \=  AppAssertionCredentials(scope\='https://www.googleapis.com/auth/devstorage.read\_write')http \= credentials.authorize(httplib2.Http(memcache))
-
-Once you have an authorized `Http` object, you can pass it to the [build()](https://google.github.io/google-api-python-client/docs/epy/googleapiclient.discovery-module.html#build) or [execute()](https://google.github.io/google-api-python-client/docs/epy/googleapiclient.http.HttpRequest-class.html#execute) functions as you normally would.
-
-## Flows
-
-Use App Engine's [Memcache](https://developers.google.com/appengine/docs/python/memcache/usingmemcache) to store `Flow` objects. When your application is simultaneously going through OAuth 2.0 steps for many users, it's normally best to store per-user `Flow` objects before the first redirection. This way, your redirection handlers can retrieve the `Flow` object already created for the user. In the following code snippet, `Memcache` is used to store and retrieve `Flow` objects keyed by user ID:
-
-```py
-import pickle
-from google.appengine.api import memcache
-from google.appengine.api import users
-from oauth2client.client import OAuth2WebServerFlow
-...
-flow = OAuth2WebServerFlow(...)
-user = users.get_current_user()
-memcache.set(user.user_id(), pickle.dumps(flow))
-...
-flow = pickle.loads(memcache.get(user.user_id()))
-```
-
-## Credentials
-
-Use the [oauth2client.contrib.appengine.CredentialsProperty](https://oauth2client.readthedocs.io/en/latest/source/oauth2client.contrib.appengine.html#oauth2client.contrib.appengine.CredentialsProperty) class as an [App Engine Datastore](https://developers.google.com/appengine/docs/python/datastore/overview) `Property`. Creating a `Model` with this `Property` simplifies storing `Credentials` as explained in the [Storage](#Storage) section below. In the following code snippet, a `Model` class is defined using this `Property`.
-
-```py
-from google.appengine.ext import db
-from oauth2client.contrib.appengine import CredentialsProperty
-...
-class CredentialsModel(db.Model):
-  credentials = CredentialsProperty()
-```
-
-## Storage
-
-Use the [oauth2client.contrib.appengine.StorageByKeyName](https://oauth2client.readthedocs.io/en/latest/source/oauth2client.contrib.appengine.html#oauth2client.contrib.appengine.StorageByKeyName) class to store and retrieve `Credentials` objects to and from the [App Engine Datastore](https://developers.google.com/appengine/docs/python/datastore/overview). You pass the model, key value, and property name to its constructor. The following shows how to create, read, and write `Credentials` objects using the example `CredentialsModel` class above:
-
-```py
-from google.appengine.api import users
-from oauth2client.contrib.appengine import StorageByKeyName
-...
-user = users.get_current_user()
-storage = StorageByKeyName(CredentialsModel, user.user_id(), 'credentials')
-credentials = storage.get()
-...
-storage.put(credentials)
-```
-
-## Samples
-
-To see how these classes work together in a full application, see the [App Engine sample applications](https://github.com/google/google-api-python-client/tree/master/samples/appengine) section of this library’s open source project page.
\ No newline at end of file
diff --git a/docs/logging.md b/docs/logging.md
index 76d07a9..408a20a 100644
--- a/docs/logging.md
+++ b/docs/logging.md
@@ -14,9 +14,9 @@
 
 In the following code, the logging level is set to `INFO`, and the Google Translate API is called:
 
-```py
+```python
 import logging
-from apiclient.discovery import build
+from googleapiclient.discovery import build
 
 logger = logging.getLogger()
 logger.setLevel(logging.INFO)
@@ -45,7 +45,7 @@
 
 For even more detailed logging you can set the debug level of the [httplib2](https://github.com/httplib2/httplib2) module used by this library. The following code snippet enables logging of all HTTP request and response headers and bodies:
 
-```py
+```python
 import httplib2
 httplib2.debuglevel = 4
 ```
\ No newline at end of file
diff --git a/docs/media.md b/docs/media.md
index 54f65e1..6bee48e 100644
--- a/docs/media.md
+++ b/docs/media.md
@@ -2,7 +2,7 @@
 
 Some API methods support uploading media files in addition to a regular body. All of these methods have a parameter called `media_body`. For example, if we had a fictional Farm service that allowed managing animals on a farm, the insert method might allow you to upload an image of the animal when adding it to the collection of all animals. The documentation for this method could be:
 
-```py
+```python
 insert = method(self, **kwargs)
 # Adds an animal to the farm.
 
@@ -13,13 +13,13 @@
 
 In the following example, the filename of an image is supplied:
 
-```py
+```python
 response = farm.animals().insert(media_body='pig.png', body={'name': 'Pig'}).execute()
 ```
 
-Alternatively, if you want to explicitly control the MIME type of the file sent, use the [googleapiclient.http.MediaFileUpload](https://google.github.io/google-api-python-client/docs/epy/googleapiclient.http.MediaFileUpload-class.html) class for the media_body value:
+Alternatively, if you want to explicitly control the MIME type of the file sent, use the [googleapiclient.http.MediaFileUpload](https://googleapis.github.io/google-api-python-client/docs/epy/googleapiclient.http.MediaFileUpload-class.html) class for the media_body value:
 
-```py
+```python
 media = MediaFileUpload('pig.png', mimetype='image/png')
 response = farm.animals().insert(media_body=media, body={'name': 'Pig'}).execute()
 ```
@@ -30,7 +30,7 @@
 
 To use resumable media you must use a MediaFileUpload object and flag it as a resumable upload. You then repeatedly call `next_chunk()` on the [`googleapiclient.http.HttpRequest`](googleapiclient.http.HttpRequest) object until the upload is complete. In the following code, the `status` object reports the progress of the upload, and the response object is created once the upload is complete:
 
-```py
+```python
 media = MediaFileUpload('pig.png', mimetype='image/png', resumable=True)
 request = farm.animals().insert(media_body=media, body={'name': 'Pig'})
 response = None
@@ -49,7 +49,7 @@
 
 > Note: Chunk size restriction: There are some chunk size restrictions based on the size of the file you are uploading. Files larger than 256 KB (256 * 1024 B) must have chunk sizes that are multiples of 256 KB. For files smaller than 256 KB, there are no restrictions. In either case, the final chunk has no limitations; you can simply transfer the remaining bytes.
 
-If a request fails, an [`googleapiclient.errors.HttpError`](https://google.github.io/google-api-python-client/docs/epy/googleapiclient.errors.HttpError-class.html) exception is thrown, which should be caught and handled. If the error is retryable, the upload can be resumed by continuing to call request.next_chunk(), but subsequent calls must use an exponential backoff strategy for retries. The retryable error status codes are:
+If a request fails, an [`googleapiclient.errors.HttpError`](https://googleapis.github.io/google-api-python-client/docs/epy/googleapiclient.errors.HttpError-class.html) exception is thrown, which should be caught and handled. If the error is retryable, the upload can be resumed by continuing to call request.next_chunk(), but subsequent calls must use an exponential backoff strategy for retries. The retryable error status codes are:
 
 - 404 Not Found (must restart upload)
 - 500 Internal Server Error
@@ -71,5 +71,5 @@
 
 ## Extending MediaUpload
 
-Your application may need to upload a media object that isn't a file. For example, you may create a large image on the fly from a data set. For such cases you can create a subclass of [MediaUpload](https://google.github.io/google-api-python-client/docs/epy/googleapiclient.http.MediaUpload-class.html) which provides the data to be uploaded. You must fully implement the MediaUpload interface. See the source for the [MediaFileUpload](https://google.github.io/google-api-python-client/docs/epy/googleapiclient.http.MediaFileUpload-class.html), [MediaIoBaseUpload](MediaIoBaseUpload), and [MediaInMemoryUpload](https://google.github.io/google-api-python-client/docs/epy/googleapiclient.http.MediaInMemoryUpload-class.html) classes as examples.
+Your application may need to upload a media object that isn't a file. For example, you may create a large image on the fly from a data set. For such cases you can create a subclass of [MediaUpload](https://googleapis.github.io/google-api-python-client/docs/epy/googleapiclient.http.MediaUpload-class.html) which provides the data to be uploaded. You must fully implement the MediaUpload interface. See the source for the [MediaFileUpload](https://googleapis.github.io/google-api-python-client/docs/epy/googleapiclient.http.MediaFileUpload-class.html), [MediaIoBaseUpload](MediaIoBaseUpload), and [MediaInMemoryUpload](https://googleapis.github.io/google-api-python-client/docs/epy/googleapiclient.http.MediaInMemoryUpload-class.html) classes as examples.
 
diff --git a/docs/mocks.md b/docs/mocks.md
index 09a69f0..d3d6ae4 100644
--- a/docs/mocks.md
+++ b/docs/mocks.md
@@ -6,15 +6,15 @@
 
 ## HttpMock
 
-This class simulates the response to a single HTTP request. As arguments, the constructor for the [HttpMock](https://google.github.io/google-api-python-client/docs/epy/googleapiclient.http.HttpMock-class.html) object takes a dictionary object representing the response header and the path to a file. When this resource built on this object is executed, it simply returns contents of the file.
+This class simulates the response to a single HTTP request. As arguments, the constructor for the [HttpMock](https://googleapis.github.io/google-api-python-client/docs/epy/googleapiclient.http.HttpMock-class.html) object takes a dictionary object representing the response header and the path to a file. When this resource built on this object is executed, it simply returns contents of the file.
 
 ### Example
 
 This example uses `HttpMock` to simulate the basic steps necessary to complete an API call to the [Google Books API](https://developers.google.com/apis-explorer/#p/books/v1/). The first Mock HTTP returns a status code of 200 and a file named `books-discovery.json`, which is the discovery document that describes the Books API. This file is a necessary part of the building of the service object, which takes place in the next few lines. The actual request is executed using the second Mock object. This returns the contents of `books-android.json`, the simulated response.
 
-```py
-from apiclient.discovery import build
-from apiclient.http import HttpMock
+```python
+from googleapiclient.discovery import build
+from googleapiclient.http import HttpMock
 import pprint
 
 http = HttpMock('books-discovery.json', {'status': '200'})
@@ -34,7 +34,7 @@
 
 ## HttpMockSequence
 
-The [HttpMockSequence](https://google.github.io/google-api-python-client/docs/epy/googleapiclient.http.HttpMockSequence-class.html) class simulates the sequence of HTTP responses. Each response consists of a header (a dictionary) and a content object (which can be a reference to a file, a JSON-like data structure defined inline, or one of the keywords listed below). When the resource built from this Mock object is executed, it returns the series of responses, one by one.
+The [HttpMockSequence](https://googleapis.github.io/google-api-python-client/docs/epy/googleapiclient.http.HttpMockSequence-class.html) class simulates the sequence of HTTP responses. Each response consists of a header (a dictionary) and a content object (which can be a reference to a file, a JSON-like data structure defined inline, or one of the keywords listed below). When the resource built from this Mock object is executed, it returns the series of responses, one by one.
 
 ### Special Values for simulated HTTP responses
 
@@ -87,9 +87,9 @@
 
 The following code snippet combines the two HTTP call simulations from the previous snippet into a single Mock object. The object created using `HttpMockSequence` simulates the return of the discovery document from the `books.volume.list` service, then the return of the result of the 'android' query (built in to the `request` object). You could add code to this snipped to print the contents of `response`, test that it returned successfully, etc.
 
-```py
-from apiclient.discovery import build
-from apiclient.http import HttpMockSequence
+```python
+from googleapiclient.discovery import build
+from googleapiclient.http import HttpMockSequence
 
 books_discovery = # Saved data from a build response
 books_android = # Saved data from a request to list android volumes
diff --git a/docs/oauth-installed.md b/docs/oauth-installed.md
index aaca065..c5f3caf 100644
--- a/docs/oauth-installed.md
+++ b/docs/oauth-installed.md
@@ -73,7 +73,7 @@
 
 To create a client object from the client_secrets.json file, use the `flow_from_clientsecrets` function. For example, to request read-only access to a user's Google Drive:
 
-```py
+```python
 from google_auth_oauthlib.flow import InstalledAppFlow
 
 flow = InstalledAppFlow.from_client_secrets_file(
@@ -89,13 +89,13 @@
 
 - The run_console function instructs the user to open the authorization URL in their browser. After the user authorizes the application, the authorization server displays a web page with an authorization code, which the user then pastes into the application. The authorization library automatically exchanges the code for an access token.
 
-    ```py
+    ```python
     credentials = flow.run_console()
     ```
 
 - The run_local_server function attempts to open the authorization URL in the user's browser. It also starts a local web server to listen for the authorization response. After the user completes the auth flow, the authorization server redirects the user's browser to the local web server. That server gets the authorization code from the browser and shuts down, then exchanges the code for an access token.
 
-    ```py
+    ```python
     credentials = flow.run_local_server(host='localhost',
         port=8080, 
         authorization_prompt_message='Please visit this URL: {url}', 
@@ -111,7 +111,7 @@
 
 1. Build a service object for the API that you want to call. You build a a service object by calling the `build` function with the name and version of the API and the authorized Http object. For example, to call version 2 of the Drive API:
 
-    ```py
+    ```python
     from googleapiclient.discovery import build
 
     drive_service = build('drive', 'v3', credentials=credentials)
@@ -119,7 +119,7 @@
 
 1. Make requests to the API service using the [interface provided by the service object](start.md#build). For example, to list the files in the authenticated user's Google Drive:
 
-    ```py
+    ```python
     files = drive_service.files().list().execute()
     ```
 
@@ -127,7 +127,7 @@
 
 The following example requests access to the user's Google Drive files. If the user grants access, the code retrieves and prints a JSON-formatted list of the five Drive files that were most recently modified by the user.
 
-```py
+```python
 import os
 import pprint
 
diff --git a/docs/oauth-server.md b/docs/oauth-server.md
index 22cba25..cb7b59d 100644
--- a/docs/oauth-server.md
+++ b/docs/oauth-server.md
@@ -4,7 +4,7 @@
 
 Typically, an application uses a service account when the application uses Google APIs to work with its own data rather than a user's data. For example, an application that uses [Google Cloud Datastore](https://cloud.google.com/datastore/) for data persistence would use a service account to authenticate its calls to the Google Cloud Datastore API.
 
-If you have a G Suite domain—if you use [G Suite](https://gsuite.google.com/), for example—an administrator of the G Suite domain can authorize an application to access user data on behalf of users in the G Suite domain. For example, an application that uses the [Google Calendar API](Google Calendar API) to add events to the calendars of all users in a G Suite domain would use a service account to access the Google Calendar API on behalf of users. Authorizing a service account to access data on behalf of users in a domain is sometimes referred to as "delegating domain-wide authority" to a service account.
+If you have a G Suite domain—if you use [G Suite](https://gsuite.google.com/), for example—an administrator of the G Suite domain can authorize an application to access user data on behalf of users in the G Suite domain. For example, an application that uses the [Google Calendar API](https://developers.google.com/calendar/) to add events to the calendars of all users in a G Suite domain would use a service account to access the Google Calendar API on behalf of users. Authorizing a service account to access data on behalf of users in a domain is sometimes referred to as "delegating domain-wide authority" to a service account.
 
 > **Note:** When you use [G Suite Marketplace](https://www.google.com/enterprise/marketplace/) to install an application for your domain, the required permissions are automatically granted to the application. You do not need to manually authorize the service accounts that the application uses.
 
@@ -74,7 +74,7 @@
 
 #### Google App Engine standard environment	
 
-```py
+```python
 from google.auth import app_engine
 
 SCOPES = ['https://www.googleapis.com/auth/sqlservice.admin']
@@ -82,11 +82,11 @@
 credentials = app_engine.Credentials(scopes=SCOPES)
 ```
 
-> **Note:** You can only use App Engine credential objects in applications that are running in a Google App Engine standard environment. If you need to run your application in other environments—for example, to test your application locally—you must detect this situation and use a different credential mechanism (see [Other platforms](https://developers.google.com/api-client-library/python/auth/service-accounts#jwtsample)).
+> **Note:** You can only use App Engine credential objects in applications that are running in a Google App Engine standard environment. If you need to run your application in other environments—for example, to test your application locally—you must detect this situation and use a different credential mechanism (see [https://google-auth.readthedocs.io/en/latest/user-guide.html#the-app-engine-standard-environment)).
 
 #### Google Compute Engine
 
-```py
+```python
 from google.auth import compute_engine
 
 credentials = compute_engine.Credentials()
@@ -94,11 +94,11 @@
 
 You must [configure your Compute Engine instance to allow access to the necessary scopes](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#changeserviceaccountandscopes).
 
-> **Note:** You can only use Compute Engine credential objects in applications that are running on Google Compute Engine. If you need to run your application in other environments—for example, to test your application locally—you must detect this situation and use a different credential mechanism (see [Other platforms](https://developers.google.com/api-client-library/python/auth/service-accounts#jwtsample)). You can use the [application default credentials](https://developers.google.com/accounts/docs/application-default-credentials) to simplify this process.
+> **Note:** You can only use Compute Engine credential objects in applications that are running on Google Compute Engine. If you need to run your application in other environments—for example, to test your application locally—you must detect this situation and use a different credential mechanism (see [Other platforms](https://google-auth.readthedocs.io/en/latest/user-guide.html#compute-engine-container-engine-and-the-app-engine-flexible-environment)). You can use the [application default credentials](https://developers.google.com/accounts/docs/application-default-credentials) to simplify this process.
 
 #### Other Platforms
 
-```py
+```python
 from google.oauth2 import service_account
 
 SCOPES = ['https://www.googleapis.com/auth/sqlservice.admin']
@@ -116,15 +116,15 @@
 
 1. Build a service object for the API that you want to call. You build a a service object by calling the build function with the name and version of the API and the authorized Http object. For example, to call version 1beta3 of the [Cloud SQL Administration API](https://cloud.google.com/sql/docs/admin-api/):
 
-    ```py
+    ```python
     import googleapiclient.discovery
 
     sqladmin = googleapiclient.discovery.build('sqladmin', 'v1beta3', credentials=credentials)
     ```
 
-1. Make requests to the API service using the [interface provided by the service object](https://developers.google.com/api-client-library/python/start/get_started#build). For example, to list the instances of Cloud SQL databases in the example-123 project:
+1. Make requests to the API service using the interface provided by the service object. For example, to list the instances of Cloud SQL databases in the example-123 project:
 
-    ```py
+    ```python
     response = sqladmin.instances().list(project='example-123').execute()
     ```
 
@@ -132,7 +132,7 @@
 
 The following example prints a JSON-formatted list of Cloud SQL instances in a project.
 
-```py
+```python
 from google.oauth2 import service_account
 import googleapiclient.discovery
 
diff --git a/docs/oauth.md b/docs/oauth.md
index 71874c9..2ce18e1 100644
--- a/docs/oauth.md
+++ b/docs/oauth.md
@@ -21,49 +21,53 @@
 
 **Warning**: Keep your client secret private. If someone obtains your client secret, they could use it to consume your quota, incur charges against your Google APIs Console project, and request access to user data.
 
-## The oauth2client library
+## The `google-auth` and `google-auth-oauthlib` libraries
 
-The [oauth2client](http://oauth2client.readthedocs.org/en/latest/index.html) library is included with the Google APIs Client Library for Python. It handles all steps of the OAuth 2.0 protocol required for making API calls. It is available as a separate [package](https://pypi.python.org/pypi/oauth2client) if you only need an OAuth 2.0 library. The sections below describe important modules, classes, and functions of this library.
+The [google-auth-oauthlib](https://google-auth-oauthlib.readthedocs.io/en/latest/reference/modules.html) library should be used for handling OAuth 2.0 protocol steps required for making API calls. You should install [google-auth](https://pypi.org/project/google-auth) and [google-auth-oauthlib](https://pypi.org/project/google-auth-oauthlib). The sections below describe important modules, classes, and functions of `google-auth-oauthlib` library.
 
 ## Flows
 
 The purpose of a `Flow` class is to acquire credentials that authorize your application access to user data. In order for a user to grant access, OAuth 2.0 steps require your application to potentially redirect their browser multiple times. A `Flow` object has functions that help your application take these steps and acquire credentials. `Flow` objects are only temporary and can be discarded once they have produced credentials, but they can also be [pickled](http://docs.python.org/library/pickle.html) and stored. This section describes the various methods to create and use `Flow` objects.
 
-**Note**: See the [Using Google App Engine](app-engine.md) and [Using Django](django.md) pages for platform-specific Flows.
+### Installed App Flow
 
-### flow_from_clientsecrets()
+The [google_auth_oauthlib.flow.InstalledAppFlow](https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.InstalledAppFlow) class is used for installed applications. This flow is useful for local development or applications that are installed on a desktop operating system. See [OAuth 2.0 for Installed Applications](oauth-installed.md).
 
-The [oauth2client.client.flow_from_clientsecrets()](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.client.html#oauth2client.client.flow_from_clientsecrets) method creates a `Flow` object from a [client_secrets.json](client-secrets.md) file. This [JSON](http://www.json.org/) formatted file stores your client ID, client secret, and other OAuth 2.0 parameters.
+```python
+from google_auth_oauthlib.flow import InstalledAppFlow
 
-The following shows how you can use `flow_from_clientsecrets()` to create a `Flow` object:
+flow = InstalledAppFlow.from_client_secrets_file(
+    'client_secrets.json',
+    scopes=['profile', 'email'])
 
-```py
-from oauth2client.client import flow_from_clientsecrets
-...
-flow = flow_from_clientsecrets('path_to_directory/client_secrets.json',
-                               scope='https://www.googleapis.com/auth/calendar',
-                               redirect_uri='http://example.com/auth_return')
-```                               
-
-### OAuth2WebServerFlow
-
-Despite its name, the [oauth2client.client.OAuth2WebServerFlow](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.client.html#oauth2client.client.OAuth2WebServerFlow) class is used for both installed and web applications. It is created by passing the client ID, client secret, and scope to its constructor: You provide the constructor with a `redirect_uri` parameter. This must be a URI handled by your application.
-
-```py
-from oauth2client.client import OAuth2WebServerFlow
-...
-flow = OAuth2WebServerFlow(client_id='your_client_id',
-                           client_secret='your_client_secret',
-                           scope='https://www.googleapis.com/auth/calendar',
-                           redirect_uri='http://example.com/auth_return')
+flow.run_local_server()
 ```
 
-### step1_get_authorize_url()
+### Flow
 
-The [step1_get_authorize_url()](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.client.html#oauth2client.client.OAuth2WebServerFlow.step1_get_authorize_url) function of the `Flow` class is used to generate the authorization server URI. Once you have the authorization server URI, redirect the user to it. The following is an example call to this function:
+The example below uses the `Flow` class to handle the installed appplication authorization flow.
 
-```py
-auth_uri = flow.step1_get_authorize_url()
+#### from_client_secrets_file()
+
+The [google_auth_oauthlib.Flow.from_client_secrets()](https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.Flow.from_client_secrets_file) method creates a `Flow` object from a [client_secrets.json](client_secrets.md) file. This [JSON](http://www.json.org/) formatted file stores your client ID, client secret, and other OAuth 2.0 parameters.
+
+The following shows how you can use `from_client_secrets_file()` to create a `Flow` object:
+
+```python
+from google_auth_oauthlib.flow import Flow
+...
+flow = Flow.from_client_secrets_file(
+    'path/to/client_secrets.json',
+    scopes=['profile', 'email'],
+    redirect_uri='urn:ietf:wg:oauth:2.0:oob')
+```                               
+
+#### authorization_url()
+
+The [authorization_url()](https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.InstalledAppFlow.authorization_url) function of the `Flow` class is used to generate the authorization server URI. Once you have the authorization server URI, redirect the user to it. The following is an example call to this function:
+
+```python
+auth_uri = flow.authorization_url()
 # Redirect the user to auth_uri on your platform.
 ```
 
@@ -75,106 +79,63 @@
 
 `http://example.com/auth_return/?error=access_denied`
 
-### step2_exchange()
+#### fetch_token()
 
-The [step2_exchange()](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.client.html#oauth2client.client.OAuth2WebServerFlow.step2_exchange) function of the `Flow` class exchanges an authorization code for a `Credentials` object. Pass the `code` provided by the authorization server redirection to this function:
+The [fetch_token()](https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.InstalledAppFlow.fetch_token) function of the `Flow` class exchanges an authorization code for a `Credentials` object. The credentials will be available in `flow.credentials`.
 
-```py
-credentials = flow.step2_exchange(code)
+```python
+# The user will get an authorization code. This code is used to get the
+# access token.
+code = input('Enter the authorization code: ')
+flow.fetch_token(code=code)
 ```
 
+
 ## Credentials
 
 A `Credentials` object holds refresh and access tokens that authorize access to a single user's data. These objects are applied to `httplib2.Http` objects to authorize access. They only need to be applied once and can be stored. This section describes the various methods to create and use `Credentials` objects.
 
-**Note**: See the [Using Google App Engine](google-app-engine.md) and [Using Django](django.md) pages for platform-specific Credentials.
+**Note**: Credentials can be automatically detected in Google App Engine and Google Compute Engine. See [Using OAuth 2.0 for Server to Server Applications](oauth-server.md#examples).
 
-### OAuth2Credentials
+### User Credentials
 
-The [oauth2client.client.OAuth2Credentials](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.client.html#oauth2client.client.OAuth2Credentials) class holds OAuth 2.0 credentials that authorize access to a user's data. Normally, you do not create this object by calling its constructor. A `Flow` object can create one for you.
+The [google.oauth2.credentials.Credentials](https://google-auth.readthedocs.io/en/latest/reference/google.oauth2.credentials.html#google.oauth2.credentials.Credentials) class holds OAuth 2.0 credentials that authorize access to a user's data. A `Flow` object can create one for you.
 
-### ServiceAccountCredentials
+### Service Account Credentials
 
-The [oauth2client.service_account.ServiceAccountCredentials](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.service_account.html) class is only used with [OAuth 2.0 Service Accounts](https://developers.google.com/accounts/docs/OAuth2ServiceAccount). No end-user is involved for these server-to-server API calls, so you can create this object directly without using a `Flow` object.
+The [google.oauth2.service_account.Credentials](https://google-auth.readthedocs.io/en/latest/reference/google.oauth2.service_account.html#google.oauth2.service_account.Credentials) class is only used with [OAuth 2.0 Service Accounts](https://developers.google.com/accounts/docs/OAuth2ServiceAccount). No end-user is involved for these server-to-server API calls, so you can create this object directly.
 
-### AccessTokenCredentials
+```python
+from google.oauth2 import service_account
 
-The [oauth2client.client.AccessTokenCredentials](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.client.html#oauth2client.client.AccessTokenCredentials) class is used when you have already obtained an access token by some other means. You can create this object directly without using a `Flow` object.
+credentials = service_account.Credentials.from_service_account_file(
+    '/path/to/key.json')
 
-### authorize()
-
-Use the [authorize()](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.client.html#oauth2client.client.Credentials.authorize) function of the `Credentials` class to apply necessary credential headers to all requests made by an [httplib2.Http](http://bitworking.org/projects/httplib2/doc/html/libhttplib2.html#httplib2.Http) instance:
-
-```py
-import httplib2
-...
-http = httplib2.Http()
-http = credentials.authorize(http)
+scoped_credentials = credentials.with_scopes(
+    ['https://www.googleapis.com/auth/cloud-platform'])
 ```
 
-Once an `httplib2.Http` object has been authorized, it is typically passed to the build function:
+### Using Credentials
 
-```py
-from apiclient.discovery import build
-...
-service = build('calendar', 'v3', http=http)
+Once a valid credentials object has been obtained it is passed to the build function:
+
+```python
+from google_auth_oauthlib.flow import InstalledAppFlow
+from googleapiclient.discovery import build
+
+flow = InstalledAppFlow.from_client_secrets_file(
+    'client_secrets.json',
+    scopes=['profile', 'email'])
+
+flow.run_local_server()
+credentials = flow.credentials
+
+service = build('calendar', 'v3', credentials=credentials)
 ```
 
 ## Storage
 
-A [oauth2client.client.Storage](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.client.html#oauth2client.client.Storage) object stores and retrieves `Credentials` objects. This section describes the various methods to create and use `Storage` objects.
+`google-auth-oauthlib` does not currently have support for credentials storage. It may be added in the future. See [oauth2client deprecation](https://google-auth.readthedocs.io/en/latest/oauth2client-deprecation.html#replacement) for more details.
 
-**Note**: See the [Using Google App Engine](app-engine.md) and [Using Django](django.md) pages for platform-specific Storage.
-
-### file.Storage
-
-The [oauth2client.file.Storage](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.file.html#oauth2client.file.Storage) class stores and retrieves a single `Credentials` object. The class supports locking such that multiple processes and threads can operate on a single store. The following shows how to open a file, save `Credentials` to it, and retrieve those credentials:
-
-```py
-from oauth2client.file import Storage
-...
-storage = Storage('_a_credentials_file_')
-storage.put(credentials)
-...
-credentials = storage.get()
-```
-
-### multistore_file
-
-The [oauth2client.contrib.multistore_file](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.contrib.multistore_file.html) module allows multiple credentials to be stored. The credentials are keyed off of:
-
-*   client ID
-*   user agent
-*   scope
-
-### keyring_storage
-
-The [oauth2client.contrib.keyring_storage](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.contrib.keyring_storage.html) module allows a single `Credentials` object to be stored in a [password manager](http://en.wikipedia.org/wiki/Password_manager) if one is available. The credentials are keyed off of:
-
-*   Name of the client application
-*   User name
-
-```py
-from oauth2client.contrib.keyring_storage import Storage
-...
-storage = Storage('_application name_', '_user name_')
-storage.put(credentials)
-...
-credentials = storage.get()
-```
-
-## Command-line tools
-
-The [oauth2client.tools.run_flow()](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.tools.html#oauth2client.tools.run_flow) function can be used by command-line applications to acquire credentials. It takes a `Flow` argument and attempts to open an authorization server page in the user's default web browser. The server asks the user to grant your application access to the user's data. If the user grants access, the run() function returns new credentials. The new credentials are also stored in the `Storage` argument, which updates the file associated with the `Storage` object.
-
-The [oauth2client.tools.run_flow()](http://oauth2client.readthedocs.org/en/latest/source/oauth2client.tools.html#oauth2client.tools.run_flow) function is controlled by command-line flags, and the Python standard library [argparse](http://docs.python.org/dev/library/argparse.html) module must be initialized at the start of your program. Argparse is included in Python 2.7+, and is available as a [separate package](https://pypi.python.org/pypi/argparse) for older versions. The following shows an example of how to use this function:
-
-```py
-import argparse
-from oauth2client import tools
-
-parser = argparse.ArgumentParser(parents=[tools.argparser])
-flags = parser.parse_args()
-...
-credentials = tools.run_flow(flow, storage, flags)
-```
+## oauth2client deprecation
+The [oauth2client](http://oauth2client.readthedocs.org/en/latest/index.html) library was previously recommended for handling the OAuth 2.0 protocol. It is now deprecated, and we recommend `google-auth` and `google-auth-oauthlib`. See [oauth2client deprecation](https://google-auth.readthedocs.io/en/latest/oauth2client-deprecation.html) for more details.
\ No newline at end of file
diff --git a/docs/pagination.md b/docs/pagination.md
index b34ede9..59497e5 100644
--- a/docs/pagination.md
+++ b/docs/pagination.md
@@ -1,12 +1,12 @@
 # Pagination
 
-Some API methods may return very large lists of data. To reduce the response size, many of these API methods support pagination. With paginated results, your application can iteratively request and process large lists one page at a time. For API methods that support it, there exist similarly named methods with a "_next" suffix. For example, if a method is named `list()`, there may also be a method named `list_next()`. These methods can be found in the API's PyDoc documentation on the [Supported APIs page](https://developers.google.com/api-client-library/python/apis/).
+Some API methods may return very large lists of data. To reduce the response size, many of these API methods support pagination. With paginated results, your application can iteratively request and process large lists one page at a time. For API methods that support it, there exist similarly named methods with a `_next` suffix. For example, if a method is named `list()`, there may also be a method named `list_next()`. These methods can be found in the API's PyDoc documentation on the [Supported APIs page](dyn/index.md).
 
 To process the first page of results, create a request object and call `execute()` as you normally would. For further pages, you call the corresponding `method_name_next()` method, and pass it the previous request and response. Continue paging until `method_name_next()` returns None.
 
 In the following code snippet, the paginated results of a Google Plus activities `list()` method are processed:
 
-```py
+```python
 activities = service.activities()
 request = activities.list(userId='someUserId', collection='public')
 
diff --git a/docs/performance.md b/docs/performance.md
index 39b8332..522da0c 100644
--- a/docs/performance.md
+++ b/docs/performance.md
@@ -14,7 +14,7 @@
 
 In the following code snippet, the `list` method of a fictitious stamps API is called. The `cents` parameter is defined by the API to only return stamps with the given value. The value of the `fields` parameter is set to 'count,items/name'. The response will only contain stamps whose value is 5 cents, and the data returned will only include the number of stamps found along with the stamp names:
 
-```py
+```python
 response = service.stamps.list(cents=5, fields='count,items/name').execute()
 ```
 
@@ -32,13 +32,13 @@
 
 To enable caching, pass in a cache implementation to the `httplib2.Http` constructor. In the simplest case, you can just pass in a directory name, and a cache will be built from that directory:
 
-```py
+```python
 http = httplib2.Http(cache=".cache")
 ```
 
 On App Engine you can use memcache as a cache object:
 
-```py
+```python
 from google.appengine.api import memcache
 http = httplib2.Http(cache=memcache)
 ```
diff --git a/docs/start.md b/docs/start.md
index e8b67d7..db3cc78 100644
--- a/docs/start.md
+++ b/docs/start.md
@@ -31,7 +31,7 @@
     
     > **Warning**: Keep refresh and access tokens private. If someone obtains your tokens, they could use them to access private user data.
     
-*   **Client ID and client secret**: These strings uniquely identify your application and are used to acquire tokens. They are created for your Google Cloud project on the [API Access pane](https://code.google.com/apis/console#:access) of the Google Cloud. There are three types of client IDs, so be sure to get the correct type for your application:
+*   **Client ID and client secret**: These strings uniquely identify your application and are used to acquire tokens. They are created for your Google Cloud project on the [API Access pane](https://console.developers.google.com/apis/credentials) of the Google Cloud. There are several types of client IDs, so be sure to get the correct type for your application:
     
     *   Web application client IDs
     *   Installed application client IDs
@@ -45,10 +45,11 @@
 
 ### Build the service object
 
-Whether you are using simple or authorized API access, you use the [build()](http://google.github.io/google-api-python-client/docs/epy/googleapiclient.discovery-module.html#build) function to create a service object. It takes an API name and API version as arguments. You can see the list of all API versions on the [Supported APIs](http://developers.google.com/api-client-library/python/apis/) page. The service object is constructed with methods specific to the given API. To create it, do the following:
+Whether you are using simple or authorized API access, you use the [build()](http://googleapis.github.io/google-api-python-client/docs/epy/googleapiclient.discovery-module.html#build) function to create a service object. It takes an API name and API version as arguments. You can see the list of all API versions on the [Supported APIs](dyn/index.md) page. The service object is constructed with methods specific to the given API. To create it, do the following:
 
-```py
-from apiclient.discovery import build
+
+```python
+from googleapiclient.discovery import build
 service = build('api_name', 'api_version', ...)
 ```
 
@@ -56,13 +57,15 @@
 
 Each API service provides access to one or more resources. A set of resources of the same type is called a collection. The names of these collections are specific to the API. The service object is constructed with a function for every collection defined by the API. If the given API has a collection named `stamps`, you create the collection object like this:
 
-```py
+
+```python
 collection = service.stamps()
 ```
 
 It is also possible for collections to be nested:
 
-```py
+
+```python
 nested_collection = service.featured().stamps()
 ```
 
@@ -70,7 +73,7 @@
 
 Every collection has a list of methods defined by the API. Calling a collection's method returns an [HttpRequest](http://google.github.io/google-api-python-client/docs/epy/googleapiclient.http.HttpRequest-class.html) object. If the given API collection has a method named `list` that takes an argument called `cents`, you create a request object for that method like this:
 
-```py
+```python
 request = collection.list(cents=5)
 ```
 
@@ -78,13 +81,13 @@
 
 Creating a request does not actually call the API. To execute the request and get a response, call the `execute()` function:
 
-```py
+```python
 response = request.execute()
 ```
 
 Alternatively, you can combine previous steps on a single line:
 
-```py
+```python
 response = service.stamps().list(cents=5).execute()
 ```
 
@@ -92,7 +95,7 @@
 
 The response is a Python object built from the JSON response sent by the API server. The JSON structure is specific to the API; for details, see the API's reference documentation. You can also simply print the JSON to see the structure:
 
-```py
+```python
 import json
 ...
 print json.dumps(response, sort_keys=True, indent=4)
@@ -118,305 +121,16 @@
 
 You can access the data like this:
 
-```py
-print 'Num 5 cent stamps: %d' % response['count']
-print 'First stamp name: %s' % response['items'][0]['name']
+```python
+print('Num 5 cent stamps: %d'.format(response['count'])
+print('First stamp name: %s'.format(['items'][0]['name']))
 ```
 
-## Examples
-
-In this section, we provide examples of each access type and application type.
-
-### Authorized API for web application example
-
-For this example, we use authorized API access for a simple web server. It calls the [Google Calendar API](http://developers.google.com/google-apps/calendar/) to list a user's calendar events. Python's built-in [BaseHTTPServer](http://docs.python.org/2/library/basehttpserver.html) is used to create the server. Actual production code would normally use a more sophisticated web server framework, but the simplicity of `BaseHTTPServer` allows the example to focus on using this library.
-
-#### Setup for example
-
-1.  **Activate the Calendar API**: [Read about API activation](http://developers.google.com/console/help/activating-apis) and activate the Calendar API.
-2.  **Get your client ID and client secret**: Get a client ID and secret for _web applications_. Use `http://localhost` as your domain. After creating the client ID, edit the _Redirect URIs_ field to contain only `http://localhost:8080/`.
-3.  **Create calendar events**: In this example, user calendar events will be read. You can use any Google account you own, including the account associated with the application's Google APIs Console project. For the target user, create a few calendar events if none exist already.
-
-#### Code for example
-
-This script is well commented to explain each step.
-
-```py
-#!/usr/bin/python
-import BaseHTTPServer
-import Cookie
-import httplib2
-import StringIO
-import urlparse
-import sys
-
-from apiclient.discovery import build
-from oauth2client.client import AccessTokenRefreshError
-from oauth2client.client import OAuth2WebServerFlow
-from oauth2client.file import Storage
-
-class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
-  """Child class of BaseHTTPRequestHandler that only handles GET request."""
-
-  # Create a flow object. This object holds the client_id, client_secret, and
-  # scope. It assists with OAuth 2.0 steps to get user authorization and
-  # credentials. For this example, the client ID and secret are command-line
-  # arguments.
-  flow = OAuth2WebServerFlow(sys.argv[1],
-                             sys.argv[2],
-                             'https://www.googleapis.com/auth/calendar',
-                             redirect_uri='http://localhost:8080/')
-
-  def do_GET(self):
-    """Handler for GET request."""
-    print '\nNEW REQUEST, Path: %s' % (self.path)
-    print 'Headers: %s' % self.headers
-
-    # To use this server, you first visit
-    # http://localhost:8080/?fake_user=<some_user_name>. You can use any name you
-    # like for the fake_user. It's only used as a key to store credentials,
-    # and has no relationship with real user names. In a real system, you would
-    # only use logged-in users for your system.
-    if self.path.startswith('/?fake_user='):
-      # Initial page entered by user
-      self.handle_initial_url()
-
-    # When you redirect to the authorization server below, it redirects back
-    # to to http://localhost:8080/?code=<some_code> after the user grants access
-    # permission for your application.
-    elif self.path.startswith('/?code='):
-      # Page redirected back from auth server
-      self.handle_redirected_url()
-    # Only the two URL patterns above are accepted by this server.
-    else:
-      # Either an error from auth server or bad user entered URL.
-      self.respond_ignore()
-
-  def handle_initial_url(self):
-    """Handles the initial path."""
-    # The fake user name should be in the URL query parameters.
-    fake_user = self.get_fake_user_from_url_param()
-
-    # Call a helper function defined below to get the credentials for this user.
-    credentials = self.get_credentials(fake_user)
-
-    # If there are no credentials for this fake user or they are invalid,
-    # we need to get new credentials.
-    if credentials is None or credentials.invalid:
-      # Call a helper function defined below to respond to this GET request
-      # with a response that redirects the browser to the authorization server.
-      self.respond_redirect_to_auth_server(fake_user)
-    else:
-      try:
-        # Call a helper function defined below to get calendar data for this
-        # user.
-        calendar_output = self.get_calendar_data(credentials)
-
-        # Call a helper function defined below which responds to this
-        # GET request with data from the calendar.
-        self.respond_calendar_data(calendar_output)
-      except AccessTokenRefreshError:
-        # This may happen when access tokens expire. Redirect the browser to
-        # the authorization server
-        self.respond_redirect_to_auth_server(fake_user)
-
-  def handle_redirected_url(self):
-    """Handles the redirection back from the authorization server."""
-    # The server should have responded with a "code" URL query parameter. This
-    # is needed to acquire credentials.
-    code = self.get_code_from_url_param()
-
-    # Before we redirected to the authorization server, we set a cookie to save
-    # the fake user for retrieval when handling the redirection back to this
-    # server. This is only needed because we are using this fake user
-    # name as a key to access credentials.
-    fake_user = self.get_fake_user_from_cookie()
-
-    #
-    # This is an important step.
-    #
-    # We take the code provided by the authorization server and pass it to the
-    # flow.step2_exchange() function. This function contacts the authorization
-    # server and exchanges the "code" for credentials.
-    credentials = RequestHandler.flow.step2_exchange(code)
-
-    # Call a helper function defined below to save these credentials.
-    self.save_credentials(fake_user, credentials)
-
-    # Call a helper function defined below to get calendar data for this user.
-    calendar_output = self.get_calendar_data(credentials)
-
-    # Call a helper function defined below which responds to this GET request
-    # with data from the calendar.
-    self.respond_calendar_data(calendar_output)
-
-  def respond_redirect_to_auth_server(self, fake_user):
-    """Respond to the current request by redirecting to the auth server."""
-    #
-    # This is an important step.
-    #
-    # We use the flow object to get an authorization server URL that we should
-    # redirect the browser to. We also supply the function with a redirect_uri.
-    # When the auth server has finished requesting access, it redirects
-    # back to this address. Here is pseudocode describing what the auth server
-    # does:
-    #   if (user has already granted access):
-    #     Do not ask the user again.
-    #     Redirect back to redirect_uri with an authorization code.
-    #   else:
-    #     Ask the user to grant your app access to the scope and service.
-    #     if (the user accepts):
-    #       Redirect back to redirect_uri with an authorization code.
-    #     else:
-    #       Redirect back to redirect_uri with an error code.
-    uri = RequestHandler.flow.step1_get_authorize_url()
-
-    # Set the necessary headers to respond with the redirect. Also set a cookie
-    # to store our fake_user name. We will need this when the auth server
-    # redirects back to this server.
-    print 'Redirecting %s to %s' % (fake_user, uri)
-    self.send_response(301)
-    self.send_header('Cache-Control', 'no-cache')
-    self.send_header('Location', uri)
-    self.send_header('Set-Cookie', 'fake_user=%s' % fake_user)
-    self.end_headers()
-
-  def respond_ignore(self):
-    """Responds to the current request that has an unknown path."""
-    self.send_response(200)
-    self.send_header('Content-type', 'text/plain')
-    self.send_header('Cache-Control', 'no-cache')
-    self.end_headers()
-    self.wfile.write(
-      'This path is invalid or user denied access:\n%s\n\n' % self.path)
-    self.wfile.write(
-      'User entered URL should look like: http://localhost:8080/?fake_user=johndoe')
-
-  def respond_calendar_data(self, calendar_output):
-    """Responds to the current request by writing calendar data to stream."""
-    self.send_response(200)
-    self.send_header('Content-type', 'text/plain')
-    self.send_header('Cache-Control', 'no-cache')
-    self.end_headers()
-    self.wfile.write(calendar_output)
-
-  def get_calendar_data(self, credentials):
-    """Given the credentials, returns calendar data."""
-    output = StringIO.StringIO()
-
-    # Now that we have credentials, calling the API is very similar to
-    # other authorized access examples.
-
-    # Create an httplib2.Http object to handle our HTTP requests, and authorize
-    # it using the credentials.authorize() function.
-    http = httplib2.Http()
-    http = credentials.authorize(http)
-
-    # The apiclient.discovery.build() function returns an instance of an API
-    # service object that can be used to make API calls.
-    # The object is constructed with methods specific to the calendar API.
-    # The arguments provided are:
-    #   name of the API ('calendar')
-    #   version of the API you are using ('v3')
-    #   authorized httplib2.Http() object that can be used for API calls
-    service = build('calendar', 'v3', http=http)
-
-    # The Calendar API's events().list method returns paginated results, so we
-    # have to execute the request in a paging loop. First, build the request
-    # object. The arguments provided are:
-    #   primary calendar for user
-    request = service.events().list(calendarId='primary')
-    # Loop until all pages have been processed.
-    while request != None:
-      # Get the next page.
-      response = request.execute()
-      # Accessing the response like a dict object with an 'items' key
-      # returns a list of item objects (events).
-      for event in response.get('items', []):
-        # The event object is a dict object with a 'summary' key.
-        output.write(repr(event.get('summary', 'NO SUMMARY')) + '\n')
-      # Get the next request object by passing the previous request object to
-      # the list_next method.
-      request = service.events().list_next(request, response)
-
-    # Return the string of calendar data.
-    return output.getvalue()
-
-  def get_credentials(self, fake_user):
-    """Using the fake user name as a key, retrieve the credentials."""
-    storage = Storage('credentials-%s.dat' % (fake_user))
-    return storage.get()
-
-  def save_credentials(self, fake_user, credentials):
-    """Using the fake user name as a key, save the credentials."""
-    storage = Storage('credentials-%s.dat' % (fake_user))
-    storage.put(credentials)
-
-  def get_fake_user_from_url_param(self):
-    """Get the fake_user query parameter from the current request."""
-    parsed = urlparse.urlparse(self.path)
-    fake_user = urlparse.parse_qs(parsed.query)['fake_user'][0]
-    print 'Fake user from URL: %s' % fake_user
-    return fake_user
-
-  def get_fake_user_from_cookie(self):
-    """Get the fake_user from cookies."""
-    cookies = Cookie.SimpleCookie()
-    cookies.load(self.headers.get('Cookie'))
-    fake_user = cookies['fake_user'].value
-    print 'Fake user from cookie: %s' % fake_user
-    return fake_user
-
-  def get_code_from_url_param(self):
-    """Get the code query parameter from the current request."""
-    parsed = urlparse.urlparse(self.path)
-    code = urlparse.parse_qs(parsed.query)['code'][0]
-    print 'Code from URL: %s' % code
-    return code
-
-def main():
-  try:
-    server = BaseHTTPServer.HTTPServer(('', 8080), RequestHandler)
-    print 'Starting server. Use Control+C to stop.'
-    server.serve_forever()
-  except KeyboardInterrupt:
-    print 'Shutting down server.'
-    server.socket.close()
-
-if __name__ == '__main__':
-  main()
-```
-
-Note how the Storage object is used to to retrieve and store credentials. If no credentials are found, the `flow.step1_get_authorize_url()` function is used to redirect the user to the authorization server. Once the user has granted access, the authorization server redirects back to the local server with a `code` query parameter. This code is passed to the `flow.step2_exchange()` function, which returns credentials. From that point forward, this script is very similar to the command-line access example above.
-
-#### Run the example
-
-1.  Copy the script to an **empty** directory on your computer.
-2.  Open a terminal and go to the directory.
-3.  Execute the following command to run the local server:
-    
-    python authorized_api_web_server_calendar.py your_client_id your_client_secret
-    
-4.  Open a web browser and log in to your Google account as the target user.
-5.  Go to this URL: `http://localhost:8080/?fake_user=target_user_name` replacing `target_user_name` with the user name for the target user.
-6.  If this is the first time the target user has accessed this local server, the target user is redirected to the authorization server. The authorization server asks the target user to grant the application access to calendar data. Click the button that allows access.
-7.  The authorization server redirects the browser back to the local server.
-8.  Calendar events for the target user are listed on the page.
-
-## Django support
-
-This library includes helper classes that simplify use in a [Django](https://www.djangoproject.com/) application. See the [Using Django](http://developers.google.com/api-client-library/python/guide/django) page for details.
-
-## Google App Engine support
-
-This library includes helper classes that simplify use in a [Google App Engine](http://developers.google.com/appengine/) application. See the [Using Google App Engine](http://developers.google.com/api-client-library/python/guide/google_app_engine) page for details.
-
 ## Finding information about the APIs
 
 Use the [APIs Explorer](http://developers.google.com/api-client-library/python/reference/apis_explorer) to browse APIs, list available methods, and even try API calls from your browser.
 
 ## Library reference documentation
 
-[PyDoc generated documentation](http://developers.google.com/api-client-library/python/reference/pydoc) is available for all modules in this library.
-
-You can get [interactive help](http://developers.google.com/api-client-library/python/reference/interactive_help) on library classes and functions using an interactive Python shell.
\ No newline at end of file
+[Core library documentation](http://googleapis.github.io/google-api-python-client/docs/epy/index.html).
+and [Library reference documentation by API](dyn/index.md). is available.
\ No newline at end of file
diff --git a/docs/thread_safety.md b/docs/thread_safety.md
index 485f74f..50bfad0 100644
--- a/docs/thread_safety.md
+++ b/docs/thread_safety.md
@@ -8,7 +8,7 @@
 
 The easiest way to provide threads with their own `httplib2.Http()` instances is to either override the construction of it within the service object or to pass an instance via the http argument to method calls.
 
-```py
+```python
 # Create a new Http() object for every request
 def build_request(http, *args, **kwargs):
   new_http = httplib2.Http()
@@ -19,10 +19,4 @@
 service = build('api_name', 'api_version')
 http = httplib2.Http()
 service.stamps().list().execute(http=http)
-```
-
-## Credential Storage objects are thread-safe
-
-All [Storage](https://oauth2client.readthedocs.io/en/latest/source/oauth2client.client.html#oauth2client.client.Storage) objects defined in this library are thread-safe, and multiple processes and threads can operate on a single store.
-
-In some cases, this library automatically refreshes expired OAuth 2.0 tokens. When many threads are sharing the same set of credentials, the threads cooperate to minimize the total number of token refresh requests sent to the server.
+```
\ No newline at end of file