From aa176ae07db107d8e4ee05cb40103e753515b8b3 Mon Sep 17 00:00:00 2001 From: Google Code Exporter Date: Mon, 28 Mar 2016 15:46:45 -0400 Subject: [PATCH] Migrating wiki contents from Google Code --- AuthenticationDesignDoc.md | 98 ++++++++++ Batch.md | 1 + BecomingAContributor.md | 105 +++++++++++ ClientDesignDocument.md | 245 +++++++++++++++++++++++++ ClientSecrets.md | 1 + ClientSecretsSupport.md | 1 + CommonParameters.md | 1 + Debugging.md | 1 + DeveloperKey.md | 1 + Django.md | 1 + GettingStarted.md | 1 + GoogleAppEngine.md | 1 + HowAuthenticationWorks.md | 3 + Installation.md | 3 + MediaUpload.md | 1 + Mocks.md | 1 + Navigation.md | 0 NonStandardDiscoveryDocuments.md | 35 ++++ OAuth2.md | 1 + OAuth2AppEngineDecorator.md | 1 + OAuth2Client.md | 18 ++ Optimizing.md | 1 + Pagination.md | 1 + ProjectHome.md | 20 +++ PyDoc.md | 1 + ReleaseProcess.md | 34 ++++ RunningDevelopment.md | 11 ++ SampleApps.md | 288 +++++++++++++++++++++++++++++ Support.md | 1 + SupportedApis.md | 3 + TestEmbed.md | 8 + Testing.md | 298 +++++++++++++++++++++++++++++++ ThreadSafety.md | 1 + 33 files changed, 1187 insertions(+) create mode 100644 AuthenticationDesignDoc.md create mode 100644 Batch.md create mode 100644 BecomingAContributor.md create mode 100644 ClientDesignDocument.md create mode 100644 ClientSecrets.md create mode 100644 ClientSecretsSupport.md create mode 100644 CommonParameters.md create mode 100644 Debugging.md create mode 100644 DeveloperKey.md create mode 100644 Django.md create mode 100644 GettingStarted.md create mode 100644 GoogleAppEngine.md create mode 100644 HowAuthenticationWorks.md create mode 100644 Installation.md create mode 100644 MediaUpload.md create mode 100644 Mocks.md create mode 100644 Navigation.md create mode 100644 NonStandardDiscoveryDocuments.md create mode 100644 OAuth2.md create mode 100644 OAuth2AppEngineDecorator.md create mode 100644 OAuth2Client.md create mode 100644 Optimizing.md create mode 100644 Pagination.md create mode 100644 ProjectHome.md create mode 100644 PyDoc.md create mode 100644 ReleaseProcess.md create mode 100644 RunningDevelopment.md create mode 100644 SampleApps.md create mode 100644 Support.md create mode 100644 SupportedApis.md create mode 100644 TestEmbed.md create mode 100644 Testing.md create mode 100644 ThreadSafety.md diff --git a/AuthenticationDesignDoc.md b/AuthenticationDesignDoc.md new file mode 100644 index 0000000..43e25ea --- /dev/null +++ b/AuthenticationDesignDoc.md @@ -0,0 +1,98 @@ + + +# Design # + +At the highest levels there are three kinds of objects: Credentials, +Flows and Storage. + +## Flow ## +Flows are responsible for going through the steps of +an OAuth dance. Upon the successful completion a Flow returns a +Credentials object. + +Credentials objects a method, `set_store()`, which +takes a callback for storing an updated Credential back to where it came from. For example, +if an OAuth 2.0 Credentials object is stored in a file then when the `access_token` +expires the client goes through the process of refreshing the `access_token` and the +whole Credentials object must be written back into that file. The argument to +`set_store` is a callable that takes an OAuth 2.0 Credentials object as its only argument. + +## Credentials ## +A Credentials object is responsible for +authorizing an `httplib2.Http()` instance so that it can make +requests using said credentials. + +## Storage ## +Storage objects can correctly save and restore Credentials to and from a specific medium. They have `get()` and `put(credentials)` methods for retrieving and storing Credentials respectively. The `put(credentials)` method is able to be passed in as the argument to the `Credentials.set_store()` method. + +# Library # + +The `oauth2client` library can be used as a standalone library against +any OAuth 2.0 service and has many features to make it easy to +with OAuth 2.0. + +## Storage ## + +The `oauth2client.file.Storage` and `oauth2client.appengine.StorageByKeyName` +allow for easy storage and retrieval of credentials. The storage +helper classes also call `set_store` on the credentials so they +can store themselves back to where they came from if their token +gets refreshed. + +Here the file Storage reads the Credentials from the +file `moderator.dat` and sets up the `set_storage` callback +so that if the access token expires and a fresh access +token is acquired it is stored back in the file `moderator.dat`. + +``` +from oauth2client.file import Storage +import httplib2 + +credentials = Storage('moderator.dat').get() + +http = httplib2.Http() +http = credentials.authorize(http) +``` + +### Creating a Storage ### + +The supplied `file.Storage` and `StorageByKeyName` classes may not +be sufficient for your needs. To do that just subclass from +`oauth2client.client.Storage` and implement the `locked_get()`, `locked_put()`, +and `locked_delete()` +methods. The important point to remember is when implementing +`locked)get()`, after the Credentials has been instantiated, to call +`set_store(self)`, so that when the OAuth 2.0 credentials +have been refreshed they get stored back for the next use. +You may also override `acquire_lock()` and `release_lock()` to implement +the locking appropriate for the storage. + +## Properties ## + +The `oauth2client.appengine` and `oauth2client.django_orm` modules +contain helper properties to make it easy to store and retrieve +Credentials and Flows to the datastores in App Engine and Django +respectively. To store a Credential in App Engine is as easy as +adding a property to a db model: + +``` +from oauth2client.appengine import CredentialsProperty +from google.appengine.ext import db + + +class Credentials(db.Model): + credentials = CredentialsProperty() +``` + +Similarly for Django: + +``` +from django.contrib.auth.models import User +from django.db import models +from apiclient.ext.django_orm import OAuthCredentialsField + + +class Credential(models.Model): + id = models.ForeignKey(User, primary_key=True) + credential = OAuthCredentialsField() +``` \ No newline at end of file diff --git a/Batch.md b/Batch.md new file mode 100644 index 0000000..d33821c --- /dev/null +++ b/Batch.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/guide/batch \ No newline at end of file diff --git a/BecomingAContributor.md b/BecomingAContributor.md new file mode 100644 index 0000000..4fcc4c3 --- /dev/null +++ b/BecomingAContributor.md @@ -0,0 +1,105 @@ +# How to become a contributor and submit patches # + +## Contributor License Agreements ## + +We'd love to accept your code patches! However, before we can take them, we have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement. + + * If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA](http://code.google.com/legal/individual-cla-v1.0.html). + * If you work for a company that wants to allow you to contribute your work to Google APIs Client Library for Python, then you'll need to sign a [corporate CLA](http://code.google.com/legal/corporate-cla-v1.0.html). + +Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll add you to the official list of contributors and be able to accept your patches. + +## Submitting Patches ## + + 1. Join Google API Client for Python [discussion group](https://groups.google.com/group/google-api-python-client/). + 1. Decide which code you want to submit. A submission should be a set of changes that addresses one issue in the Google API Client for Python [issue tracker](http://code.google.com/p/google-api-python-client/issues/list). Please don't mix more than one logical change per submittal, because it makes the history hard to follow. If you want to make a change that doesn't have a corresponding issue in the issue tracker, please create one. + 1. Also, coordinate with team members that are listed on the issue in question. This ensures that work isn't being duplicated and communicating your plan early also generally leads to better patches. + 1. Ensure that your code adheres to the PEP 8 style, with the exception of spacing, which should be two spaces. + 1. Ensure that there are unit tests for your code. + 1. Sign a Contributor License Agreement. + 1. Use the `upload-diffs.py` script to upload your patches to [codereview.appspot.com](http://codereview.appspot.com) for review. + + +## Submitting a sample ## + +Same procedure as for submitting patches, but with the additional provisions: + + 1. Add a README file following the format below. + 1. Start with the Google+ sample as a template for how your sample should be structured. + +### README File Format ### + +The information for the SampleApps wiki page is built from data found in all the README +files in the samples. The format of the README file is: + +``` + Description is everything up to the first blank line. + + api: plus (Use the name in discovery). + keywords: appengine (such as appengine, oauth2, cmdline) + author: Your name (email address is optional) + + The rest of the file is ignored when it comes to building the index. +``` + +The list of valid keywords is defined here: + +> http://code.google.com/p/google-api-python-client/source/browse/samples-index.py#51 + +### Using `upload-diffs.py` and the code review site ### + +**Note** that if you have 2-factor authentication turned on for your account then you will need to go to https://google.com/accounts, Select Security Tab, then Edit "Authorizing applications and sites" and add an application specific password for upload-diffs.py. + +In most cases running + +``` +$ python upload-diffs.py +``` + +will Do The Right Thing without any additional input. `upload-diffs.py` is a streamlined version of `upload.py` created by the [Rietveldt project](http://code.google.com/p/rietveld), and the documents on their wiki plus `upload-diffs.py --help` can help if you need more detailed instructions. There is also an article [here](http://code.google.com/p/rietveld/wiki/CodeReviewHelp) on how to go through the code review process. + +Once the code review has started you may be asked to make changes to your code. Once you have made those changes run `upload-diffs.py` again to update the patch. You will need to know the codereview issue number. Assuming it is 123456: + +``` +$ python upload-diffs.py -i 123456 +``` + + +### Reviewing ### + +If you are doing a review the easiest way to work with patches is [mercurial queues](http://mercurial.selenic.com/wiki/MqExtension). If we assume the codereview issue is again 123456, in the upper right-hand corner of the code review page is a "Download raw patch set" link, which is the URL of the patchset to import: + +``` +$ hg qimport http://codereview.appspot.com/download/issue123456_10000.diff +``` + +You can then `hg qpush` the patch into your repository and when you are done `hq qpop` it back out again. Once the patch is in good shape you can `hg qfinish` it to commit it to the repository. + +## Submitting Your Approved Code ## + +First pull and rebase to avoid branch/merge issues: + +``` +$ hg pull --rebase +``` + +When you submit make sure to add a link to where the code was reviewed in the commit message, along with a good description of the change: + +``` +This change blah blah blah. + +Reviewed in http://codereview.appspot.com/123456/. +``` + +If there is an associated issue also add this line +to the commit message, which will automatically mark +the issue as closed. + +``` +Fixes issue #nnnn. +``` + +Once the issue is committed, go back and add a link to the commit to +the review, and mark the review as completed. \ No newline at end of file diff --git a/ClientDesignDocument.md b/ClientDesignDocument.md new file mode 100644 index 0000000..654f089 --- /dev/null +++ b/ClientDesignDocument.md @@ -0,0 +1,245 @@ +# Client Design # + +The new Python client library will be used solely for discovery based APIs and will have no backward compatibility with non-discovery based APIs. Learning from the past several years of development with the V1 and V2 versions of the client libraries, this version of the library with eschew hand-coded per-API classes. + +## Requirements ## + + * A modular design that allows the following components to be pluggable: + * Model + * HTTP Client + * Storage Model for Auth Keys + * HTTP Cache + * Native support for OAuth 2.0 + +In addition the following things would be nice to have, but not required: + * Python 3.x support by 2to3. + +## Overview ## + +At the highest level the interaction begins with building a service model to interact with the API. The service model is built from the discovery document. + +``` +def build( + service, + version, + http = httplib2.Http(), + discoveryServiceUrl = DISCOVERY_URI, + model = JsonModel() +) +``` + +**service** + +> Name of the API, such as plus, moderator, or latitude. + +**version** + +> Version of the API to use. + +**http** + +> An httplib2 compatible instance that also is expected to handle authentication. + +**discoveryServiceUrl** + +> URI Template for the discovery service. + +**model** + +> The data model converts from the wire format into data objects. Also responsible for instantiating prototype models. + +## Example ## + +Here is an example interaction using the client library. The example below uses a simple JsonModel with serializes the JSON wire format using simplejson. Note that the below example does not show using the Command Pattern for requests. + +Also see the `sample.py` file in the v3 directory for example usage. + +``` +>>> import apiclient +>>> import oauth_wrap +>>> http = oauth_wrap.get_wrapped_http() # Handles Auth +>>> service = discovery.build("plus", "v1", http) +>>> help(service) + +Help on Service in module discovery object: + +class Service(__builtin__.object) +| Top level interface for a service +| +| Methods defined here: +| +| __init__(self, http=) +| +| activities = method(self, **kwargs) +| A description of how to use this function +| +| comments = method(self, **kwargs) +| A description of how to use this function +| +| feeds = method(self, **kwargs) +| A description of how to use this function +| +| groups = method(self, **kwargs) +| A description of how to use this function +| +| people = method(self, **kwargs) +| A description of how to use this function +| +| photos = method(self, **kwargs) +| A description of how to use this function +| + +>>> activities = service.activities() +>>> help(activities) + + class Resource(__builtin__.object) + | A class for interacting with a resource. + | + | Methods defined here: + | + | __init__(self) + | + | delete = method(self, **kwargs) + | A description of how to use this function + | + | scope - A parameter + | alt - A parameter + | postId - A parameter + | userId - A parameter + | + | get = method(self, **kwargs) + | A description of how to use this function + | + | alt - A parameter + | postId - A parameter + | userId - A parameter + | + | insert = method(self, **kwargs) + | A description of how to use this function + | + | body - A parameter + | userId - A parameter + | alt - A parameter + | preview - A parameter + | resource - A parameter + | + | list = method(self, **kwargs) + | A description of how to use this function + | + | c - A parameter + | userId - A parameter + | max_results - A parameter + | scope - A parameter + | alt - A parameter + | max_comments - A parameter + | max_liked - A parameter + | + | search = method(self, **kwargs) + | A description of how to use this function + | + | c - A parameter + | pid - A parameter + | lon - A parameter + | q - A parameter + | max_results - A parameter + | radius - A parameter + | bbox - A parameter + | lat - A parameter + | alt - A parameter + | + | update = method(self, **kwargs) + | A description of how to use this function + | + | body - A parameter + | userId - A parameter + | abuseType - A parameter + | scope - A parameter + | alt - A parameter + | postId - A parameter + | + | + +>>> help(activities.list) + +| Help on method method in module __main__: +| +| method(self, **kwargs) method of __main__.Resource instance +| A description of how to use this function +| +| c - A parameter +| userId - A parameter +| max_results - A parameter +| scope - A parameter +| alt - A parameter +| max_comments - A parameter +| max_liked - A parameter + + +>>> activitylist = activities.list(scope='@self', userId='@me') +>>> activitylist + +{u'kind': u'plus#activityFeed', u'links': {u'self': [{u'href': u'https://www.googleapis.com/plus/v1/activities/118170877744527614111/@self?alt=json', u'type': u'application/json'}], u'hub': [{u'href': u'http://pubsubhubbub.appspot.com/'}]}, u'title': u'Google plus Self Feed for Joe Gregorio', u'items': [{u'kind': u'plus#activity', u'links': {u'liked': [{u'count': 0, u'href': u'https://www.googleapis.com/plus/v1/activities/118170877744527614111... +u'tag:google.com,2010:plus:z133s5h4bqbxczdh304cfb5bqovngjr51ko0k'}], u'updated': u'2010-06-14T17:08:31.511Z', u'id': u'tag:google.com,2010:plus-feed:self:posted:118170877744527614111'} + +>>> activitylist['items'][0]['title'] +First Post! + +>>> newitem = { + u'kind': u'plus#activity', + u'object': { + u'content': u'Just a test note to show that insert is working.', + u'type': u'note', + } + } + +>>> activity = p.activities().insert(userId='@me', body=newitem) +>>> print activity['published'] +2010-07-02T17|28| 59.000Z + +``` + + +## Transport Layer ## + +Transport will be implemented by httplib2, which supports caching, etags, and a pluggable authentication system. + +## Authentication Layer ## + +Authentication will be handled by using the python-oauth2 open source library. The demo code shows how that can be wrapped around an httplib2 instance. + +## Asynchronous and Batch ## + +The `apiclient.build` method starts constructing a simple direct interface to the API, which means that every call executes synchronously, only returning when it is done. This is a good default and easy to learn for people new to the library. There will also be a more complex `apiclient.build_async` method that constructs a more complex interface to the API, which uses the Command pattern for request objects. The asynchronous interface will allow batching request objects into a single batch request, and also support submitting requests objects into an asynchronous queue to be processed. Jeff Scudder already has a good start on such objects in an experimental library. + +The asynchronous support should include an optional exponential backoff to retry requests that fail with 408, 503, or 504. + +## IDE Support ## + +Since the objects in the library are constructed dynamically based on the contents of the discovery document there will be very little native support an IDE will be able to provide as far as doc strings and auto completion. It is an open question if, and how, to support IDEs using this library. + +## Discovery ## + +The objects returned from `apiclient.build()` are constructed from the information in the discovery document. The discovery document should be cached to avoid introducing excessive latency into situations where the calling application may have a short lifetime, such as when running on App Engine. + +## Model ## + +The model object is responsible for modifying outgoing requests to add an appropriate `Accept` header and `Content-Type` header if appropriate. It is also responsible for serializing model objects to and from the wire format. Finally it is responsible for providing prototype objects for non-GET methods. For instance, in the example above the activities collection the `insert` method takes a body, which is the model object to insert into the collection. There will be an `activities.insert_body()` method the returns an instance of an object to insert into the collection. The prototype object is built up from the discovery schema for that method. + +## Python ## + +The oldest supported version will be Python 2.4. + +## Third Party Libraries ## + +The following third-party libraries will be used by the client library: + + * simplejson - MIT License + * httplib2 - MIT License + * python-oauth2 - MIT License + * uri-templates - Apache 2.0 + +The simplejson library will only be required for Python 2.4 and 2.5 as simplejson is included in Python 2.6 and later. + +## JSON-RPC ## + +TDB \ No newline at end of file diff --git a/ClientSecrets.md b/ClientSecrets.md new file mode 100644 index 0000000..a97cbec --- /dev/null +++ b/ClientSecrets.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/guide/aaa_client_secrets \ No newline at end of file diff --git a/ClientSecretsSupport.md b/ClientSecretsSupport.md new file mode 100644 index 0000000..8998652 --- /dev/null +++ b/ClientSecretsSupport.md @@ -0,0 +1 @@ +This page have moved to https://developers.google.com/api-client-library/python/guide/aaa_oauth#flow_from_clientsecrets \ No newline at end of file diff --git a/CommonParameters.md b/CommonParameters.md new file mode 100644 index 0000000..25f676b --- /dev/null +++ b/CommonParameters.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/guide/standard_parameters \ No newline at end of file diff --git a/Debugging.md b/Debugging.md new file mode 100644 index 0000000..59f2e4f --- /dev/null +++ b/Debugging.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/guide/logging \ No newline at end of file diff --git a/DeveloperKey.md b/DeveloperKey.md new file mode 100644 index 0000000..0dcd33e --- /dev/null +++ b/DeveloperKey.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/guide/aaa_apikeys \ No newline at end of file diff --git a/Django.md b/Django.md new file mode 100644 index 0000000..58ac426 --- /dev/null +++ b/Django.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/platforms/django \ No newline at end of file diff --git a/GettingStarted.md b/GettingStarted.md new file mode 100644 index 0000000..9a908df --- /dev/null +++ b/GettingStarted.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/start/get_started \ No newline at end of file diff --git a/GoogleAppEngine.md b/GoogleAppEngine.md new file mode 100644 index 0000000..73fa460 --- /dev/null +++ b/GoogleAppEngine.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/platforms/google_app_engine \ No newline at end of file diff --git a/HowAuthenticationWorks.md b/HowAuthenticationWorks.md new file mode 100644 index 0000000..9ee7b08 --- /dev/null +++ b/HowAuthenticationWorks.md @@ -0,0 +1,3 @@ +# Introduction # + +This page has moved to https://developers.google.com/api-client-library/python/guide/aaa_oauth#oauth \ No newline at end of file diff --git a/Installation.md b/Installation.md new file mode 100644 index 0000000..8a79dde --- /dev/null +++ b/Installation.md @@ -0,0 +1,3 @@ +# Installing the library + +This page has moved to https://developers.google.com/api-client-library/python/start/installation \ No newline at end of file diff --git a/MediaUpload.md b/MediaUpload.md new file mode 100644 index 0000000..64604d1 --- /dev/null +++ b/MediaUpload.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/guide/media_upload \ No newline at end of file diff --git a/Mocks.md b/Mocks.md new file mode 100644 index 0000000..7cb3d55 --- /dev/null +++ b/Mocks.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/guide/mocks \ No newline at end of file diff --git a/Navigation.md b/Navigation.md new file mode 100644 index 0000000..e69de29 diff --git a/NonStandardDiscoveryDocuments.md b/NonStandardDiscoveryDocuments.md new file mode 100644 index 0000000..15030f2 --- /dev/null +++ b/NonStandardDiscoveryDocuments.md @@ -0,0 +1,35 @@ +# Introduction # + +By default the library uses the API name and version number and looks up the discovery document that describes the API on `https://www.googleapis.com`. There are several ways to over-ride that behavior. + +# URI Template # + +You can supply a different URI Template to the library that it will then use to look up APIs. The template variable names must be 'api' and 'apiVersion'. + +``` +DISCOVERY_URI = ('http://localhost:3990/discovery/v1/apis/' + '{api}/{apiVersion}/rest') + +service = build("plus", "v1", discoveryServiceUrl=DISCOVERY_URI) +``` + + +# Local Discovery Docs # + +The second way is to keep a copy of the discovery document locally and pass +that in when building a service: + +``` +# Load the local copy of the discovery document +f = file(os.path.join(os.path.dirname(__file__), "plus.json"), "r") +discovery = f.read() +f.close() + +# Construct a service from the local documents +service = build_from_document(discovery, + base="https://www.googleapis.com/", + http=http) +``` + +Note that you need to also provide the base parameter, which is the base URI to +which all the API calls are relative. \ No newline at end of file diff --git a/OAuth2.md b/OAuth2.md new file mode 100644 index 0000000..1ecb03f --- /dev/null +++ b/OAuth2.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/guide/aaa_oauth \ No newline at end of file diff --git a/OAuth2AppEngineDecorator.md b/OAuth2AppEngineDecorator.md new file mode 100644 index 0000000..73fa460 --- /dev/null +++ b/OAuth2AppEngineDecorator.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/platforms/google_app_engine \ No newline at end of file diff --git a/OAuth2Client.md b/OAuth2Client.md new file mode 100644 index 0000000..96d56ba --- /dev/null +++ b/OAuth2Client.md @@ -0,0 +1,18 @@ +# Introduction # + +The `oauth2client` library makes it easy to connect to resources protected by [OAuth 2.0](http://oauth.net/2/). The `oauth2client` library comes as part of the google-api-python-client, but is also available as a separate download if you just need the OAuth 2.0 capabilities. + +The library supports these Python environments: + + * Python 2.4, 2.5, 2.6, 2.7 + * Google App Engine + * Django + +[Download a release package](http://code.google.com/p/google-api-python-client/downloads/list). + +# Features # + +This is a pure Python library that can be used from any platform. Samples are included for Google App Engine, and Django. The library has been tested against the Google and DailyMotion implementations of OAuth 2.0. + +The code is currently in Beta and under active development. Please report all bugs in the [issue tracker](http://code.google.com/p/google-api-python-client/issues/list) and [ask questions in the discussion forum](http://groups.google.com/group/google-api-python-client). + diff --git a/Optimizing.md b/Optimizing.md new file mode 100644 index 0000000..4469c67 --- /dev/null +++ b/Optimizing.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/guide/performance \ No newline at end of file diff --git a/Pagination.md b/Pagination.md new file mode 100644 index 0000000..6bc923b --- /dev/null +++ b/Pagination.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/guide/pagination \ No newline at end of file diff --git a/ProjectHome.md b/ProjectHome.md new file mode 100644 index 0000000..886dc95 --- /dev/null +++ b/ProjectHome.md @@ -0,0 +1,20 @@ +This project has moved! + + * google-api-python-client has moved to http://github.com/google/google-api-python-client + * oauth2client has moved to http://github.com/google/oauth2client + +All following text is deprecated and left in only for historical purposes. + +This project is the home of Google APIs Client Library for Python, which includes: + + * google-api-python-client: The core Python library for accessing Google APIs. + * oauth2client: A Python client library for OAuth 2.0. + * Sample applications using google-api-python-client and oauth2client + +The documentation for using this library is found on the [Google Developers Google APIs Client Library for Python](https://developers.google.com/api-client-library/python/start/get_started) page. + +You can see the [Sample Applications](SampleApps.md) page for a description of all available samples, and the [PyDoc](http://google-api-python-client.googlecode.com/hg/docs/epy/frames.html) for detailed descriptions of the modules in the library. + +If you would like to contribute to this library, see the [Contributing page](BecomingAContributor.md) and [Design Documents](http://code.google.com/p/google-api-python-client/w/list?q=label:DesignDoc). + +Please report all bugs in the [issue tracker](http://code.google.com/p/google-api-python-client/issues/list) and ask questions on [stackoverflow, tagged with google-api-python-client](http://stackoverflow.com/questions/tagged/google-api-python-client), or in the [discussion forum](http://groups.google.com/group/google-api-python-client). \ No newline at end of file diff --git a/PyDoc.md b/PyDoc.md new file mode 100644 index 0000000..af181ec --- /dev/null +++ b/PyDoc.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/reference/pydoc \ No newline at end of file diff --git a/ReleaseProcess.md b/ReleaseProcess.md new file mode 100644 index 0000000..8381641 --- /dev/null +++ b/ReleaseProcess.md @@ -0,0 +1,34 @@ +# Overview # + +Releasing a new download requires a few steps to be performed. For each release, the changes are listed in the release notes, pydocs are updated to reflect changes in the code, and the library source code, tests, etc. are packaged up in tar.gz files and .zip archives. The archives are then added to the Downloads section of this project. See detailed step by step instructions below. + +# Steps # + + 1. Create a new release tracking bug to track this release. + 1. Browse to the [New Issue page](http://code.google.com/p/google-api-python-client/issues/entry). + 1. Select the Release template. + 1. In the summary, enter "Release X.Y.Z", replacing X.Y.Z appropriately. + 1. In the description, enter in the version you're releasing, the freeze date at which you'll cut the release, and the date which you'll do the release and publish the actual release packages. + 1. Make sure that you're marked as the owner, since you're doing the release. + 1. If the release is blocked on any other bugs, make sure they're listed in the Blocked On field. + 1. Submit the issue. + 1. Once the issue is submitted, and you're ready to cut the release, add a comment to the issue giving the exact commit hash at which you're cutting the release. This ensures people know exactly what is and is not in the release. + 1. Write release notes for the new release. + 1. Update the version number in `apiclient/__init__.py` and `apiclient/__init__.py`. Follow PEP 386 naming conventions. + 1. Regenerate all the documentation pages. `$ make docs` + 1. Add new packages and files to the indexes so that they will be included in the archives and installed. + 1. Edit the `MANIFEST.in` file, which lists all of the files which should be included in the .zip and .tar.gz archives. + 1. Edit the list of packages in `setup.py`. This list determines which packages will be compiled and installed on the user's system. + 1. Run the unit tests. + 1. Tag the version in mercurial: `$ hg tag 2.0.XX` + 1. Commit everything that's changed in your local copy. Push your changes. + 1. Generate the download archives. + 1. `$ make prerelease` + 1. Test the release packages by extracting, installing and running the samples, preferably on a clean machine. + 1. `$ make release` to upload the packages and update PyPi. + 1. Mark all old packages as Deprecated and mark all the new packages as Featured. + 1. Update the release bug you created at the beginning of this, noting the tag of the commit containing all of the updated release files. + 1. Update the release bug, marking it as fixed. + 1. Send an email to the list announcing the release. + +Now repeat the same process for setup\_oauth2client.py and "Make oauth2\_release" \ No newline at end of file diff --git a/RunningDevelopment.md b/RunningDevelopment.md new file mode 100644 index 0000000..4970dd9 --- /dev/null +++ b/RunningDevelopment.md @@ -0,0 +1,11 @@ +# setpath.sh # + +Instead of installing the client library you can run the following +from the root of the project directory and it will add the library +to the PYTHONPATH, obviating the need to install the library: + +``` +$ source setpath.sh +``` + +Note that you must have all the Python libraries that google-api-python-client relies upon installed. \ No newline at end of file diff --git a/SampleApps.md b/SampleApps.md new file mode 100644 index 0000000..2e4b1ab --- /dev/null +++ b/SampleApps.md @@ -0,0 +1,288 @@ + +# Samples By API # + +### ![http://www.google.com/images/icons/product/doubleclick-32.gif](http://www.google.com/images/icons/product/doubleclick-32.gif) Ad Exchange Buyer API ### + +Lets you manage your Ad Exchange Buyer account. + +Documentation for the Ad Exchange Buyer API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/adexchangebuyer/v1.3/python/latest/) + +| [/samples/adexchangebuyer](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fadexchangebuyer) | Samples for working with the Ad Exchange Buyer API. | +|:----------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------| + +### ![http://www.google.com/images/icons/product/adsense-32.png](http://www.google.com/images/icons/product/adsense-32.png) AdSense Management API ### + +Gives AdSense publishers access to their inventory and the ability to generate reports + +Documentation for the AdSense Management API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/adsense/v1.3/python/latest/) + +| [/samples/adsense](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fadsense) | A collection of command-line samples for the AdSense Management API. | +|:------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/analytics-32.png](http://www.google.com/images/icons/product/analytics-32.png) Google Analytics API ### + +View and manage your Google Analytics data + +Documentation for the Google Analytics API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/analytics/v3/python/latest/) + +| [/samples/analytics](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fanalytics) | Command-line samples for producing reports with the Analytics API. | +|:----------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/search-32.gif](http://www.google.com/images/icons/product/search-32.gif) Enterprise Audit API ### + +Lets you access user activities in your enterprise made through various applications. + +Documentation for the Enterprise Audit API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/audit/v1/python/latest/) + +| [/samples/audit](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Faudit) | Prints the activities for a domain using the Audit API. | +|:--------------------------------------------------------------------------------------------------------|:--------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/blogger-32.png](http://www.google.com/images/icons/product/blogger-32.png) Blogger API ### + +API for access to the data within Blogger. + +Documentation for the Blogger API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/blogger/v3/python/latest/) + +| [/samples/blogger](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fblogger) | Retrieve the list of blogs and their posts for a user. | +|:------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/search-32.gif](http://www.google.com/images/icons/product/search-32.gif) Google Maps Coordinate API ### + +Lets you view and manage jobs in a Coordinate team. + +Documentation for the Google Maps Coordinate API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/coordinate/v1/python/latest/) + +| [/samples/coordinate](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fcoordinate) | Demonstrates how to use the Google Coordinate API. | +|:------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------| + +### ![http://www.google.com/images/icons/product/search-32.gif](http://www.google.com/images/icons/product/search-32.gif) CustomSearch API ### + +Lets you search over a website or collection of websites + +Documentation for the CustomSearch API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/customsearch/v1/python/latest/) + +| [/samples/customsearch](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fcustomsearch) | Search from the command-line. | +|:----------------------------------------------------------------------------------------------------------------------|:------------------------------| + +### ![http://www.google.com/images/icons/feature/filing_cabinet_search-g32.png](http://www.google.com/images/icons/feature/filing_cabinet_search-g32.png) APIs Discovery Service ### + +Lets you discover information about other Google APIs, such as what APIs are available, the resource and method details for each API. + +Documentation for the APIs Discovery Service in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/discovery/v1/python/latest/) + +| [/samples/api-python-client-doc](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fapi-python-client-doc) | This sample is the code that drives http://api-python-client-doc.appspot.com/ It is an application that serves up the Python help documentation for each API. | +|:----------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/search-32.gif](http://www.google.com/images/icons/product/search-32.gif) Groups Settings API ### + +Lets you manage permission levels and related settings of a group. + +Documentation for the Groups Settings API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/groupssettings/v1/python/latest/) + +| [/samples/groupssettings](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fgroupssettings) | Sample for the Groups Settings API. | +|:--------------------------------------------------------------------------------------------------------------------------|:------------------------------------| + +### ![http://www.google.com/images/icons/product/gplus-32.png](http://www.google.com/images/icons/product/gplus-32.png) Google+ API ### + +The Google+ API enables developers to build on top of the Google+ platform. + +Documentation for the Google+ API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/plus/v1/python/latest/) + +| [/samples/appengine](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fappengine) | Simple Google+ sample that demonstrates the people API. Demontrates using the OAuth 2.0 Decorator for Google App Engine applications. | +|:----------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------| +| [/samples/plus](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fplus) | Loop over all a user's activities and print a short snippet. | +| [/samples/django\_sample](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fdjango_sample) | Sample app demonstrating using oauth2client and the Google+ API from Django. | + +### ![http://www.google.com/images/icons/feature/predictionapi-32.png](http://www.google.com/images/icons/feature/predictionapi-32.png) Prediction API ### + +Lets you access a cloud hosted machine learning service that makes it easy to build smart apps + +Documentation for the Prediction API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/prediction/v1.6/python/latest/) + +| [/samples/prediction](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fprediction) | Before you can run the prediction sample prediction.py, you must load some csv formatted data into Google Storage. You can do this by running setup.sh with a bucket/object name of your choice. You must first create the bucket you want to use. This can be done with the gsutil function or via the web UI (Storage Access) in the Google APIs Console. | +|:------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/search-32.gif](http://www.google.com/images/icons/product/search-32.gif) Search API For Shopping ### + +Lets you search over product data. + +Documentation for the Search API For Shopping in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/shopping/v1/python/latest/) + +| [/samples/searchforshopping](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fsearchforshopping) | Samples demonstrating the query capabilities for the Search API for Shopping. | +|:--------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------| + +### ![https://www.google.com/images/icons/product/cloud_storage-32.png](https://www.google.com/images/icons/product/cloud_storage-32.png) Cloud Storage API ### + +Lets you store and retrieve potentially-large, immutable data objects. + +Documentation for the Cloud Storage API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/storage/v1beta2/python/latest/) + +| [/samples/storage](http://code.google.com/p/google-cloud-platform-samples/source/browse?repo=storage#git%252Ffile-transfer-json) | Uploads and downloads files between Google Cloud Storage and the local filesystem using the Google APIs Python Client Library. | +|:---------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/tasks-32.png](http://www.google.com/images/icons/product/tasks-32.png) Tasks API ### + +Lets you manage your tasks and task lists. + +Documentation for the Tasks API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/tasks/v1/python/latest/) + +| [/samples/tasks\_appengine](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Ftasks_appengine) | Sample code for Getting Started with Tasks API on App Engine article. http://code.google.com/appengine/articles/python/getting_started_with_tasks_api.html | +|:-----------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------| +| [/samples/service\_account](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fservice_account) | Sample that demonstrates working with Service Accounts. | + +### ![http://www.google.com/images/icons/product/translate-32.png](http://www.google.com/images/icons/product/translate-32.png) Translate API ### + +Lets you translate text from one language to another + +Documentation for the Translate API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/translate/v2/python/latest/) + +| [/samples/translate](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Ftranslate) | Simple sample for the translate API. | +|:----------------------------------------------------------------------------------------------------------------|:-------------------------------------| + +### ![http://www.google.com/images/icons/product/search-32.gif](http://www.google.com/images/icons/product/search-32.gif) URL Shortener API ### + +Lets you create, inspect, and manage goo.gl short URLs + +Documentation for the URL Shortener API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/urlshortener/v1/python/latest/) + +| [/samples/urlshortener](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Furlshortener) | Shortens and URL with the URL Shortener API. | +|:----------------------------------------------------------------------------------------------------------------------|:---------------------------------------------| + +### ![http://www.google.com/images/icons/product/youtube-32.png](http://www.google.com/images/icons/product/youtube-32.png) YouTube Data API ### + +Programmatic access to YouTube features. + +Documentation for the YouTube Data API in [PyDoc](https://google-api-client-libraries.appspot.com/documentation/youtube/v3/python/latest/) + +| [/samples/youtube](https://code.google.com/p/youtube-api-samples/source/browse/#git%2Fsamples%2Fpython) | YouTube samples using the Google APIs Python Client Library. | +|:--------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------| + +# Pagination Samples # + + + + +
+ +
/samples/plus Loop over all a user's activities and print a short snippet.
+ +# OAuth 2.0 Samples # + + + + +
+ + + + + + + + + +
/samples/appengine Simple Google+ sample that demonstrates the people API. Demontrates using the OAuth 2.0 Decorator for Google App Engine applications.
/samples/django_sample Sample app demonstrating using oauth2client and the Google+ API from Django.
/samples/service_account Sample that demonstrates working with Service Accounts.
+ +# Media Upload and Download Samples # + + + + +
+ + + + + +
/samples/storage Uploads and downloads files between Google Cloud Storage and the local filesystem using the Google APIs Python Client Library.
/samples/youtube YouTube samples using the Google APIs Python Client Library.
+ +# Django Samples # + + + + +
+ +
/samples/django_sample Sample app demonstrating using oauth2client and the Google+ API from Django.
+ +# Command-line Samples # + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
/samples/adexchangebuyer Samples for working with the Ad Exchange Buyer API.
/samples/adsense A collection of command-line samples for the AdSense Management API.
/samples/analytics Command-line samples for producing reports with the Analytics API.
/samples/audit Prints the activities for a domain using the Audit API.
/samples/blogger Retrieve the list of blogs and their posts for a user.
/samples/coordinate Demonstrates how to use the Google Coordinate API.
/samples/customsearch Search from the command-line.
/samples/groupssettings Sample for the Groups Settings API.
/samples/plus Loop over all a user's activities and print a short snippet.
/samples/prediction Before you can run the prediction sample prediction.py, you must load some csv formatted data into Google Storage. You can do this by running setup.sh with a bucket/object name of your choice. You must first create the bucket you want to use. This can be done with the gsutil function or via the web UI (Storage Access) in the Google APIs Console.
/samples/searchforshopping Samples demonstrating the query capabilities for the Search API for Shopping.
/samples/storage Uploads and downloads files between Google Cloud Storage and the local filesystem using the Google APIs Python Client Library.
/samples/translate Simple sample for the translate API.
/samples/urlshortener Shortens and URL with the URL Shortener API.
/samples/youtube YouTube samples using the Google APIs Python Client Library.
+ +# Google App Engine Samples # + + + + +
+ + + + + + + + + +
/samples/api-python-client-doc This sample is the code that drives http://api-python-client-doc.appspot.com/ It is an application that serves up the Python help documentation for each API.
/samples/appengine Simple Google+ sample that demonstrates the people API. Demontrates using the OAuth 2.0 Decorator for Google App Engine applications.
/samples/tasks_appengine Sample code for Getting Started with Tasks API on App Engine article. http://code.google.com/appengine/articles/python/getting_started_with_tasks_api.html
diff --git a/Support.md b/Support.md new file mode 100644 index 0000000..5fb0a48 --- /dev/null +++ b/Support.md @@ -0,0 +1 @@ +This page has moved to https://developers.google.com/api-client-library/python/support \ No newline at end of file diff --git a/SupportedApis.md b/SupportedApis.md new file mode 100644 index 0000000..a10037b --- /dev/null +++ b/SupportedApis.md @@ -0,0 +1,3 @@ +The Google API Client for Python is a small flexible client library for accessing the following Google APIs. To see samples for each API, please visit that API's documentation. + +<wiki:gadget url="http://api-python-client-doc.appspot.com/\_gadget/" height=1000 width=600 caja=0 border="0" /> \ No newline at end of file diff --git a/TestEmbed.md b/TestEmbed.md new file mode 100644 index 0000000..da4d65c --- /dev/null +++ b/TestEmbed.md @@ -0,0 +1,8 @@ + + +<iframe src="https://docs.google.com/presentation/embed?id=1KqevSqe6ygWVj4U-wlarKU7-SVR79x-vjpR4gEc4A9Q&start=false&loop=false&delayms=3000" frameborder="0" width="960" height="749" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"> + + + +</iframe> + diff --git a/Testing.md b/Testing.md new file mode 100644 index 0000000..3d5be49 --- /dev/null +++ b/Testing.md @@ -0,0 +1,298 @@ + +# Samples By API # + +### ![http://www.google.com/images/icons/product/adsense-32.png](http://www.google.com/images/icons/product/adsense-32.png) AdSense Management API ### + +> Gives AdSense publishers access to their inventory and the ability to generate reports + +> [PyDoc](http://api-python-client-doc.appspot.com/adsense/v1.1) + +| [/samples/adsense](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fadsense) | A collection of command-line samples for the AdSense Management API. | +|:------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/analytics-32.png](http://www.google.com/images/icons/product/analytics-32.png) Google Analytics API ### + +> View and manage your Google Analytics data + +> [PyDoc](http://api-python-client-doc.appspot.com/analytics/v3) + +| [/samples/analytics](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fanalytics) | Command-line samples for producting reports with the Analytics API. | +|:----------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/search-32.gif](http://www.google.com/images/icons/product/search-32.gif) Enterprise Audit API ### + +> Lets you access user activities in your enterprise made through various applications. + +> [PyDoc](http://api-python-client-doc.appspot.com/audit/v1) + +| [/samples/audit](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Faudit) | Prints the activities for a domain using the Audit API. | +|:--------------------------------------------------------------------------------------------------------|:--------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/blogger-32.png](http://www.google.com/images/icons/product/blogger-32.png) Blogger API ### + +> API for access to the data within Blogger. + +> [PyDoc](http://api-python-client-doc.appspot.com/blogger/v2) + +| [/samples/blogger](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fblogger) | Retrieve the list of blogs and their posts for a user. | +|:------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/search-32.gif](http://www.google.com/images/icons/product/search-32.gif) CustomSearch API ### + +> Lets you search over a website or collection of websites + +> [PyDoc](http://api-python-client-doc.appspot.com/customsearch/v1) + +| [/samples/customsearch](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fcustomsearch) | Search from the command-line. | +|:----------------------------------------------------------------------------------------------------------------------|:------------------------------| + +### ![http://www.google.com/images/icons/feature/filing_cabinet_search-g32.png](http://www.google.com/images/icons/feature/filing_cabinet_search-g32.png) APIs Discovery Service ### + +> Lets you discover information about other Google APIs, such as what APIs are available, the resource and method details for each API + +> [PyDoc](http://api-python-client-doc.appspot.com/discovery/v1) + +| [/samples/api-python-client-doc](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fapi-python-client-doc) | This sample is the code that drives http://api-python-client-doc.appspot.com/ It is an application that serves up the Python help documentation for each API. | +|:----------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/search-32.gif](http://www.google.com/images/icons/product/search-32.gif) Groups Settings Api ### + +> Groups Settings Api + +> [PyDoc](http://api-python-client-doc.appspot.com/groupssettings/v1) + +| [/samples/groupssettings](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fgroupssettings) | Sample for the Groups Settings API. | +|:--------------------------------------------------------------------------------------------------------------------------|:------------------------------------| + +### ![http://www.google.com/images/icons/product/search-32.gif](http://www.google.com/images/icons/product/search-32.gif) Google Latitude API ### + +> Lets you read and update your current location and work with your location history + +> [PyDoc](http://api-python-client-doc.appspot.com/latitude/v1) + +| [/samples/latitude](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Flatitude) | Add a new location via the Latitude API. | +|:--------------------------------------------------------------------------------------------------------------|:-----------------------------------------| +| [/samples/tz](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Ftz) | This is an example program that can run as a power management hook to set the timezone on the computer based on the user's location, as determined by Google Latitude. To use this application you will need Google Latitude running on a mobile device. | + +### ![http://www.google.com/images/icons/product/search-32.gif](http://www.google.com/images/icons/product/search-32.gif) Moderator API ### + +> Moderator API + +> [PyDoc](http://api-python-client-doc.appspot.com/moderator/v1) + +| [/samples/moderator](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fmoderator) | Create new Moderator series and topics via the Moderator API. | +|:----------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------| +| [/samples/threadqueue](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fthreadqueue) | Demonstrates using threading and thread queues for handling a high volume of requests. | + +### ![http://www.google.com/images/icons/product/gplus-32.png](http://www.google.com/images/icons/product/gplus-32.png) Google+ API ### + +> The Google+ API enables developers to build on top of the Google+ platform. + +> [PyDoc](http://api-python-client-doc.appspot.com/plus/v1) + +| [/samples/appengine](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fappengine) | Simple Google+ sample that demonstrates the people API. Demontrates using the OAuth 2.0 Decorator for Google App Engine applications. | +|:----------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------| +| [/samples/plus](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fplus) | Loop over all a user's activities and print a short snippet. | +| [/samples/django\_sample](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fdjango_sample) | Sample app demonstrating using oauth2client and the Google+ API from Django. | + +### ![http://www.google.com/images/icons/feature/predictionapi-32.png](http://www.google.com/images/icons/feature/predictionapi-32.png) Prediction API ### + +> Lets you access a cloud hosted machine learning service that makes it easy to build smart apps + +> [PyDoc](http://api-python-client-doc.appspot.com/prediction/v1.5) + +| [/samples/prediction](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fprediction) | Before you can run the prediction sample prediction.py, you must load some csv formatted data into Google Storage. You can do this by running setup.sh with a bucket/object name of your choice. You must first create the bucket you want to use. This can be done with the gsutil function or via the web UI (Storage Access) in the Google APIs Console. | +|:------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/search-32.gif](http://www.google.com/images/icons/product/search-32.gif) Search API for Shopping ### + +> Lets you search over product data + +> [PyDoc](http://api-python-client-doc.appspot.com/shopping/v1) + +| [/samples/searchforshopping](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fsearchforshopping) | Samples demonstrating the query capabilities for the Search API for Shopping. | +|:--------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/app_engine-32.png](http://www.google.com/images/icons/product/app_engine-32.png) TaskQueue API ### + +> Lets you access a Google App Engine Pull Task Queue over REST. + +> [PyDoc](http://api-python-client-doc.appspot.com/taskqueue/v1beta1) + +| [/samples/gtaskqueue\_sample](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fgtaskqueue_sample) | This acts as a sample as well as commandline tool for accessing Google TaskQueue APIs. | +|:---------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------| + +### ![http://www.google.com/images/icons/product/tasks-32.png](http://www.google.com/images/icons/product/tasks-32.png) Tasks API ### + +> Lets you manage your tasks and task lists. + +> [PyDoc](http://api-python-client-doc.appspot.com/tasks/v1) + +| [/samples/tasks\_appengine](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Ftasks_appengine) | Sample code for Getting Started with Tasks API on App Engine article. http://code.google.com/appengine/articles/python/getting_started_with_tasks_api.html | +|:-----------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------| +| [/samples/service\_account](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fservice_account) | Sample that demonstrates working with Service Accounts. | + +### ![http://www.google.com/images/icons/product/translate-32.png](http://www.google.com/images/icons/product/translate-32.png) Translate API ### + +> Lets you translate text from one language to another + +> [PyDoc](http://api-python-client-doc.appspot.com/translate/v2) + +| [/samples/translate](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Ftranslate) | Simple sample for the translate API. | +|:----------------------------------------------------------------------------------------------------------------|:-------------------------------------| + +### ![http://www.google.com/images/icons/product/search-32.gif](http://www.google.com/images/icons/product/search-32.gif) URL Shortener API ### + +> Lets you create, inspect, and manage goo.gl short URLs + +> [PyDoc](http://api-python-client-doc.appspot.com/urlshortener/v1) + +| [/samples/appengine\_with\_robots](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Fappengine_with_robots) | Sample application that demonstrates how to use AppAssertionCredentials to access an API. | +|:------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------| +| [/samples/urlshortener](http://code.google.com/p/google-api-python-client/source/browse/#hg%2Fsamples%2Furlshortener) | Shortens and URL with the URL Shortener API. | + +# Pagination Samples # + + + +
+ +
+
/samples/plus Loop over all a user's activities and print a short snippet.
+ +# OAuth 2.0 Samples # + + + +
+ +
+ +
+ + + +
+ + + +
+ + + +
+ + +
/samples/dailymotion Demonstrates using oauth2client against the DailyMotion API.
/samples/appengine Simple Google+ sample that demonstrates the people API. Demontrates using the OAuth 2.0 Decorator for Google App Engine applications.
/samples/django_sample Sample app demonstrating using oauth2client and the Google+ API from Django.
/samples/service_account Sample that demonstrates working with Service Accounts.
/samples/appengine_with_robots Sample application that demonstrates how to use AppAssertionCredentials to access an API.
+ +# Threading Samples # + + + +
+ +
+
/samples/threadqueue Demonstrates using threading and thread queues for handling a high volume of requests.
+ +# Django Samples # + + + +
+ +
+
/samples/django_sample Sample app demonstrating using oauth2client and the Google+ API from Django.
+ +# Command-line Samples # + + + +
+ +
+ +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + +
/samples/adsense A collection of command-line samples for the AdSense Management API.
/samples/analytics Command-line samples for producting reports with the Analytics API.
/samples/audit Prints the activities for a domain using the Audit API.
/samples/blogger Retrieve the list of blogs and their posts for a user.
/samples/customsearch Search from the command-line.
/samples/groupssettings Sample for the Groups Settings API.
/samples/latitude Add a new location via the Latitude API.
/samples/tz This is an example program that can run as a power management hook to set the timezone on the computer based on the user's location, as determined by Google Latitude. To use this application you will need Google Latitude running on a mobile device.
/samples/moderator Create new Moderator series and topics via the Moderator API.
/samples/threadqueue Demonstrates using threading and thread queues for handling a high volume of requests.
/samples/plus Loop over all a user's activities and print a short snippet.
/samples/prediction Before you can run the prediction sample prediction.py, you must load some csv formatted data into Google Storage. You can do this by running setup.sh with a bucket/object name of your choice. You must first create the bucket you want to use. This can be done with the gsutil function or via the web UI (Storage Access) in the Google APIs Console.
/samples/searchforshopping Samples demonstrating the query capabilities for the Search API for Shopping.
/samples/gtaskqueue_sample This acts as a sample as well as commandline tool for accessing Google TaskQueue APIs.
/samples/translate Simple sample for the translate API.
/samples/urlshortener Shortens and URL with the URL Shortener API.
+ +# Google App Engine Samples # + + + +
+ +
+ +
+ + + +
+ + + +
+ + + +
+ + +
/samples/dailymotion Demonstrates using oauth2client against the DailyMotion API.
/samples/api-python-client-doc This sample is the code that drives http://api-python-client-doc.appspot.com/ It is an application that serves up the Python help documentation for each API.
/samples/appengine Simple Google+ sample that demonstrates the people API. Demontrates using the OAuth 2.0 Decorator for Google App Engine applications.
/samples/tasks_appengine Sample code for Getting Started with Tasks API on App Engine article. http://code.google.com/appengine/articles/python/getting_started_with_tasks_api.html
/samples/appengine_with_robots Sample application that demonstrates how to use AppAssertionCredentials to access an API.
\ No newline at end of file diff --git a/ThreadSafety.md b/ThreadSafety.md new file mode 100644 index 0000000..c058dd3 --- /dev/null +++ b/ThreadSafety.md @@ -0,0 +1 @@ +https://developers.google.com/api-client-library/python/guide/thread_safety \ No newline at end of file