AdWords API Python Client Library ================================= Google's AdWords API service lets developers design computer programs that interact directly with the AdWords platform. With these applications, advertisers and third parties can more efficiently -- and creatively -- manage their large or complex AdWords accounts and campaigns. AdWords API Python Client Library makes it easier to write Python clients to programmatically access AdWords accounts. One of the main features of this client library is that it hides SOAP layer from end user, which makes it much more easier to interact with API. The outgoing and incoming SOAP messages are monitored and logged on demand. The response headers like responseTime, units, requestId, etc. can also be logged on demand. Another nice feature of this client library is that it handles data types for all API call parameters. No longer do you need to remember that AdGroupId is of type int and CriterionId is long. Both of these variables can now be sent as simple strings, when passing them as parameters. In fact, all variables are passed as either dict, list, or str. The conversion to the right type is handled internally by the client library. Reports can be downloaded in XML or CSV format. Each client instance keeps track of its own number of API units and operations consumed during program run. Demo scripts are a set of Python scrips, located in "demo/", which demonstate how to use client library. Documentation was generated using Epydoc, a nice tool for generating API documentation for Python modules. Data files are a set of files in CSV format located in "lib/data/". These files contain data like countries and their codes, currencies, world cities and their codes, etc. The directory also contains other data files used by the library. Client library includes a set of unit tests located in "tests/". All unit tests are (and should be) executed against Sandbox environment. Whenever changes are made to the clien library, the appropriate unit test should be executed to make sure that everything is working as intended and no new bugs were introduced. How do I start? --------------- Start by making sure that you have Python and SOAPpy installed on your machine. If you don't have one already, sign up for a Google Account at https://www.google.com/accounts/NewAccount. Once that's taken care of, run the 'setup.py' script to set authentication headers and pick which data should be logged. Look over the scripts in demo/ directory, for some examples. Familiarize yourself with supported featues by reading documentation located in "docs/index.html". Write some code and enjoy! How to make a release? ---------------------- Run unit tests in "tests/" and demo programs in "/demo" to make sure that no new bugs were introduced. Update LIB_VERSION in "setup.py". Update "ChangeLog" with new changes. Delete user specific data files: "auth.ini", "config.ini", "logs/request_info.log", and "logs/soap_xml.log". Delete all instances of ".pyc" files from client library. Delete old documentation from "docs/". Regenerate new documenation by executing the following command from client library's home directory, $ epydoc --name "AdWords API Python Client Library" --html lib/*.py -o docs Create new directory with a name "awapi_python_lib_v.v.v", where v.v.v is a version number (i.e. 0.1.0), and copy new release into it. Pack new release into a tarball and then gzip it, $ tar -cvf awapi_python_lib_v.v.v.tar awapi_python_lib_v.v.v/ $ gzip awapi_python_lib_v.v.v.tar Where do I submit bug reports and feature requests? --------------------------------------------------- Bug reports and feature requests can be submitted at http://code.google.com/p/google-api-adwords-python-lib/issues/list. External Dependencies: ---------------------- - Python -- http://www.python.org/ - SOAPpy v0.12.0 -- http://pywebsvcs.sourceforge.net/ - Epydoc -- http://epydoc.sourceforge.net/ (only if you will be generating docs) - Google Account -- https://www.google.com/accounts/NewAccount Author: api.sgrinberg@gmail.com (Stan Grinberg)