@@ -9,6 +9,9 @@ and DoubleClick for Publishers. The library provides easy ways to store your
99authentication and create SOAP web service clients. It also contains example
1010code to help you get started integrating with our APIs.
1111
12+ ** NOTE** : As of v20.0.0 this library is _ not_ compatible with Python versions less than Python 3.6.
13+ Also ` suds ` is no longer supported in this library, ` zeep ` is now the only supported SOAP client.
14+
1215## Getting started
13161 . Download and install the library
1417
@@ -112,12 +115,6 @@ can do the following:
112115logging.basicConfig(level = logging.INFO , format = googleads.util.LOGGER_FORMAT )
113116logging.getLogger(' googleads.soap' ).setLevel(logging.DEBUG )
114117```
115-
116- If you are using suds, you can achieve the same like this:
117- ``` python
118- logging.basicConfig(level = logging.INFO , format = googleads.util.LOGGER_FORMAT )
119- logging.getLogger(' suds.transport' ).setLevel(logging.DEBUG )
120- ```
121118If you wish to log to a file, you'll need to attach a log handler to this source
122119which is configured to write the output to a file.
123120
@@ -138,68 +135,14 @@ class DangerousZeepLogger(zeep.Plugin):
138135adwords_client.zeep_client.plugins.append(DangerousZeepLogger())
139136```
140137
141- When using suds, this library will apply log filters to the ` googleads.common ` ,
142- ` suds.client ` , and ` suds.transport ` loggers in order to omit sensitive data. If
143- you need to see this data in your logs, you can disable the filters with the
144- following:
145- ``` python
146- logging.getLogger(' googleads.common' ).removeFilter(
147- googleads.util.GetGoogleAdsCommonFilter())
148- logging.getLogger(' suds.client' ).removeFilter(
149- googleads.util.GetSudsClientFilter())
150- logging.getLogger(' suds.mx.core' ).removeFilter(
151- googleads.util.GetSudsMXCoreFilter())
152- logging.getLogger(' suds.mx.literal' ).removeFilter(
153- googleads.util.GetSudsMXLiteralFilter())
154- logging.getLogger(' suds.transport' ).removeFilter(
155- googleads.util.GetSudsTransportFilter())
156- ```
157-
158-
159- ## I'm familiar with suds/zeep. Can I use those features in the library?
160- Yes, you can. The services returned by the ` client.GetService() ` functions all
161- have a reference to the underlying client stored in the ` zeep_client ` or ` suds_client `
162- attributes. You can retrieve the client and use it in familiar ways:
163- ``` python
164- client = AdWordsClient.LoadFromStorage()
165- campaign_service = client.GetService(' CampaignService' )
166- suds_client = campaign_service.suds_client
167-
168- campaign = suds_client.factory.create(' Campaign' )
169- # Set any attributes on the campaign object which you need.
170- campaign.name = ' My Campaign'
171- campaign.status = ' PAUSED'
172-
173- operation = suds_client.factory.create(' CampaignOperation' )
174- operation.operator = ' ADD'
175- operation.operand = campaign
176-
177- # The service object returned from the client.GetService() call accepts suds
178- # objects and will set the SOAP and HTTP headers for you.
179- campaign_service.mutate([operation])
180-
181- # Alternatively, if you wish to set the headers yourself, you can use the
182- # suds_client.service directly.
183- soap_header = suds_client.factory.create(' SoapHeader' )
184- soap_header.clientCustomerId = client.client_customer_id
185- soap_header.developerToken = client.developer_token
186- soap_header.userAgent = client.user_agent
187-
188- suds_client.set_options(
189- soapheaders = soap_header,
190- headers = client.oauth2_client.CreateHttpHeader())
191-
192- suds_client.service.mutate([operation])
193- ```
194-
195138## How can I configure or disable caching?
196139
197140By default, clients are cached because reading and digesting the WSDL
198141can be expensive. However, the default caching method requires permission to
199142access a local file system that may not be available in certain hosting
200143environments such as App Engine.
201144
202- You can pass an implementation of ` suds.cache.Cache ` or ` zeep.cache.Base ` to the ` AdWordsClient ` or
145+ You can pass an implementation of ` zeep.cache.Base ` to the ` AdWordsClient ` or
203146` AdManagerClient ` initializer to modify the default caching behavior.
204147
205148For example, configuring a different location and duration of the cache file with zeep
@@ -210,14 +153,6 @@ adwords_client = adwords.AdWordsClient(
210153 client_customer_id = client_customer_id, cache = doc_cache)
211154```
212155
213- And with suds:
214- ``` python
215- doc_cache = suds.cache.DocumentCache(location = cache_path, days = 2 )
216- adwords_client = adwords.AdWordsClient(
217- developer_token, oauth2_client, user_agent,
218- client_customer_id = client_customer_id, cache = doc_cache)
219- ```
220-
221156You can also disable caching in similar fashion with zeep
222157``` python
223158adwords_client = adwords.AdWordsClient(
@@ -226,26 +161,16 @@ adwords_client = adwords.AdWordsClient(
226161 cache = googleads.common.ZeepServiceProxy.NO_CACHE )
227162```
228163
229- And with suds:
230- ``` python
231- adwords_client = adwords.AdWordsClient(
232- developer_token, oauth2_client, user_agent,
233- client_customer_id = client_customer_id, cache = suds.cache.NoCache())
234- ```
235-
236-
237164## Requirements
238165
239166### Python Versions
240167
241- This library supports both Python 2 and 3. To use this library, you will need to
242- have Python 2.7.9 (or higher) or Python 3.4 (or higher) installed.
168+ This library only supports Python 3.6+.
243169
244170### External Dependencies:
245171
246172 - httplib2 -- https://pypi.python.org/pypi/httplib2/
247173 - oauth2client -- https://pypi.python.org/pypi/oauth2client/
248- - suds-jurko -- https://pypi.python.org/pypi/suds-jurko/
249174 - pysocks -- https://pypi.python.org/pypi/PySocks/
250175 - pytz -- https://pypi.python.org/pypi/pytz
251176 - pyYAML -- https://pypi.python.org/pypi/pyYAML/
0 commit comments