-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME.Common
More file actions
113 lines (92 loc) · 5.62 KB
/
README.Common
File metadata and controls
113 lines (92 loc) · 5.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
The Google Ads APIs Python Client Libraries Common Framework
============================================================
The common framework upon with the Ads APIs libraries is based on the SOAP
toolkit "SOAPpy". We are currently maintaining a patch set and distributing
SOAPpy with the library, so there is no need for you to download and install it.
Features Common to All Ads Products
-----------------------------------
The common layer exposes several features that all of the supported Ads products
take advantage of. They include:
SSL Certificate Verification - Python 2.6 and above only.
---------------------------------------------------------
By default, Python does not validate the certificate returned by a server
when using an HTTPS connection.
Reference: http://docs.python.org/library/httplib.html
To protect yourself from certain potentially malicious behaviors you may
provide a source of trusted certificates and have the library validate
certificates during all WSDL, SOAP, ClientLogin, and OAuth interactions.
To require certificate validation, take the following steps:
1) Store trusted certificates on your file system. To learn how to create
or obtain certificates, please reference the Python docs:
http://docs.python.org/library/ssl.html#ssl-certificates
2) Pass the path to the file location into your Client object's "ca_certs"
property.
CERTS_LOCATION = '/path/to/cacerts.pem'
client = AdWordsClient() # Or DfaClient, DfpClient, etc.
client.ca_certs = CERTS_LOCATION
**NOTE** Using the SSL certificate verification feature alters the behavior
of Python's built-in httplib.HTTPS class. All code in your application which
uses this class, either directly or indirectly, will be forced to validate
against the same certificate file.
The Client Configuration Dictionary
-----------------------------------
All Client classes can take a configuration dictionary in their constructors.
If one is not provided explicitly, the library will attempt to locate a
configuration pkl file specific to the ads product you are using and load
values from it. These are the supported values:
Key |Default| Description
-------------|-------|--------------------------------------------------------
proxy | None | HTTP Proxy to use only for ClientLogin requests.
-------------|-------|--------------------------------------------------------
xml_parser | 1 | Which XML Parser to use. 1 = PYXML, 2 = ElementTree
-------------|-------|--------------------------------------------------------
debug | 'n' | Prints the SOAP XML messages your app is sending and
| | receiving to sys.err as they occur
-------------|-------|--------------------------------------------------------
raw_debug | 'n' | Skips the library's error handling. With raw_debug on,
| | erroneous operations will return information on the
| | error rather than raising an exception
-------------|-------|--------------------------------------------------------
xml_log | 'y' | Logs the full SOAP messages your app sends and receives
-------------|-------|--------------------------------------------------------
request_log | 'y' | Logs basic info on what requests were made and when
-------------|-------|--------------------------------------------------------
raw_response | 'n' | Operations return the raw SOAP XML response as a string
-------------|-------|--------------------------------------------------------
strict | 'y' | Enforces that only designated servers can be used. Also
| | validates outgoing objects are properly formatted
-------------|-------|--------------------------------------------------------
pretty_xml | 'y' | Prettyprint the XML in your SOAP log / debug stream
-------------|-------|--------------------------------------------------------
compress | 'y' | Use gzip compression on HTTP interactions
-------------|-------|--------------------------------------------------------
wrap_in_tuple| 'y' | Returned objects from the server are wrapped in a
| | tuple. If a list is returned, it is unpacked directly
| | into the tuple
-------------|-------|--------------------------------------------------------
Some of these values are also exposed as properties on the client object. They
are debug, raw_debug, xml_parser, strict, and compress. Other values can be
loaded from a pickle generated by the config.py script. These values are
xml_parser, debug, xml_log, and request_log.
Where do I submit bug reports and/or feature requests?
---------------------------------------------------
Use the issue tracker at
http://code.google.com/p/google-api-ads-python/issues/list.
External Dependencies:
----------------------
- Python v2.4+ -- http://www.python.org/
- PyXML v0.8.3+ -- http://sourceforge.net/projects/pyxml/
or
ElementTree v1.2.6+ -- http://effbot.org/zone/element-index.htm
or
cElementTree v1.0.6+ -- http://www.python.org/
(part of the Python v2.5+)
or
lxml v2.2+ -- http://codespeak.net/lxml/index.html
- Epydoc -- http://epydoc.sourceforge.net/
(only if you will be generating docs)
Author:
api.sgrinberg@gmail.com (Stan Grinberg)
api.jdilallo@gmail.com (Joseph DiLallo)
Maintainer:
api.jdilallo@gmail.com (Joseph DiLallo)