1
- #The googleads Python client library
1
+ # The googleads Python client library
2
2
3
3
4
4
This client library simplifies accessing Google's SOAP Ads APIs - AdWords,
5
5
and DoubleClick for Publishers. The library provides easy ways to store your
6
6
authentication and create SOAP web service clients. It also contains example
7
7
code to help you get started integrating with our APIs.
8
8
9
- ##Getting started
9
+ ## Getting started
10
10
1 . Download and install the library
11
11
12
12
* [ setuptools] ( https://pypi.python.org/pypi/setuptools ) is a pre-requisite
@@ -46,7 +46,7 @@ code to help you get started integrating with our APIs.
46
46
47
47
* [ Developing a web application (AdWords or DFP)] ( https://github.com/googleads/googleads-python-lib/wiki/API-access-on-behalf-of-your-clients-(web-flow) )
48
48
49
- ####Where can I find samples?
49
+ #### Where can I find samples?
50
50
51
51
You can find code examples for the latest versions of AdWords or DFP on the
52
52
[ releases] ( https://github.com/googleads/googleads-python-lib/releases ) page.
@@ -55,11 +55,11 @@ Alternatively, you can find [AdWords](https://github.com/googleads/googleads-pyt
55
55
or [ DFP] ( https://github.com/googleads/googleads-python-lib/tree/master/examples/dfp )
56
56
samples in the examples directory of this repository.
57
57
58
- ####Where can I find the pydocs?
58
+ #### Where can I find the pydocs?
59
59
60
60
Our pydocs can be found [ here] ( http://googleads.github.io/googleads-python-lib ) .
61
61
62
- ####Caching authentication information
62
+ #### Caching authentication information
63
63
64
64
It is possible to cache your API authentication information. The library
65
65
includes a sample file showing how to do this named ` googleads.yaml ` . Fill
@@ -76,7 +76,7 @@ adwords_client = adwords.AdWordsClient.LoadFromStorage()
76
76
dfp_client = dfp.DfpClient.LoadFromStorage(' C:\My\Directory\googleads.yaml' )
77
77
```
78
78
79
- ####How do I change the Client Customer Id at runtime?
79
+ #### How do I change the Client Customer Id at runtime?
80
80
You can change the Client Customer Id with the following:
81
81
82
82
```
@@ -85,7 +85,7 @@ adwords_client.SetClientCustomerId('my_client_customer_id')
85
85
```
86
86
87
87
88
- ##Where do I submit bug reports and/or feature requests?
88
+ ## Where do I submit bug reports and/or feature requests?
89
89
90
90
If you have issues directly related to the client library, use the [ issue
91
91
tracker] ( https://github.com/googleads/googleads-python-lib/issues ) .
@@ -100,7 +100,7 @@ Make sure to subscribe to our [Google Plus page](https://plus.google.com/+Google
100
100
for API change announcements and other news.
101
101
102
102
103
- ##How do I log SOAP interactions?
103
+ ## How do I log SOAP interactions?
104
104
The library uses Python's built in logging framework. If you wish to log your
105
105
SOAP interactions to stdout, you can do the following:
106
106
``` python
@@ -111,7 +111,7 @@ If you wish to log to a file, you'll need to attach a log handler to this source
111
111
which is configured to write the output to a file.
112
112
113
113
114
- ##How do I disable log filters?
114
+ ## How do I disable log filters?
115
115
By default, this library will apply log filters to the ` googleads.common ` ,
116
116
` suds.client ` , and ` suds.transport ` loggers in order to omit sensitive data. If
117
117
you need to see this data in your logs, you can disable the filters with the
@@ -126,7 +126,7 @@ logging.getLogger('suds.transport').removeFilter(
126
126
```
127
127
128
128
129
- ##I'm familiar with suds. Can I use suds features with this library?
129
+ ## I'm familiar with suds. Can I use suds features with this library?
130
130
Yes, you can. The services returned by the ` client.GetService() ` functions all
131
131
have a reference to the underlying suds client stored in the ` suds_client `
132
132
attribute. You can retrieve the client and use it in familiar ways:
@@ -162,7 +162,7 @@ suds_client.set_options(
162
162
suds_client.service.mutate([operation])
163
163
```
164
164
165
- ##How can I configure or disable caching for the suds client?
165
+ ## How can I configure or disable caching for the suds client?
166
166
167
167
By default, the suds clients are cached because reading and digesting the WSDL
168
168
can be expensive. However, the default caching method requires permission to
@@ -187,26 +187,15 @@ adwords_client = adwords.AdWordsClient(
187
187
client_customer_id = client_customer_id, cache = suds.cache.NoCache())
188
188
```
189
189
190
- ##Timeout Tips
191
- The requests sent by this library are sent via urllib, which is consequently
192
- where the timeout is set. If you set a system timeout elsewhere, the googleads
193
- library will respect it.
194
190
195
- You can do the following if you wish to override the timeout:
191
+ ## Requirements
196
192
197
- ``` python
198
- import socket
199
- socket.setdefaulttimeout(15 * 60 )
200
- ```
201
-
202
- ##Requirements
203
-
204
- ###Python Versions
193
+ ### Python Versions
205
194
206
195
This library supports both Python 2 and 3. To use this library, you will need to
207
196
have Python 2.7.9 (or higher) or Python 3.4 (or higher) installed.
208
197
209
- ###External Dependencies:
198
+ ### External Dependencies:
210
199
211
200
- httplib2 -- https://pypi.python.org/pypi/httplib2/
212
201
- oauth2client -- https://pypi.python.org/pypi/oauth2client/
@@ -221,5 +210,5 @@ have Python 2.7.9 (or higher) or Python 3.4 (or higher) installed.
221
210
(only needed to run unit tests)
222
211
223
212
224
- ##Authors:
213
+ ## Authors:
225
214
Mark Saniscalchi
0 commit comments