Google Announces pyKML Python Library and DFA API Security Improvements

Google announced the following two upcoming security enhancements made to the DoubleClick for Advertisers API (DFA API) -- "We want you to be aware of adjustments to HTTP support and token lifespan and to take them into consideration when planning the development and upkeep of your applications," Joseph DiLallo, DFA API Team stated.Moving Towards Secure […]

DoubleClick for Advertisers API (DFA API)Google announced the following two upcoming security enhancements made to the DoubleClick for Advertisers API (DFA API) -- "We want you to be aware of adjustments to HTTP support and token lifespan and to take them into consideration when planning the development and upkeep of your applications," Joseph DiLallo, DFA API Team stated.

Moving Towards Secure Connections
Last year Google began impriving the security of its APIs with SSL encryption. Most of Google's Ads APIs already require requests to be made over HTTPS connections. The DFA API will be following suit this year. "We'll consider the use of HTTP connections deprecated with the release of v1.17 in mid-February, 2012. Support for making requests over HTTP will be completely retired in v1.18, expected to launch in May, 2012. Our client libraries will transition to using HTTPS connections during the launch of v1.17," informed DiLallo.

On the Horizon: Expiring Tokens
Currently, tokens generated from the login service's authenticate operation do not expire unless the user profile's password is changed. Soon, API tokens "will have a timed lifespan." "We'll be adding a new error code to represent a failure due to an expired token so that your applications will be able to catch and handle this situation," DiLallo revealed.

pyKML Python libraryAlso, Google's Geo team today introduced "pyKML," an open source Python library for generating, parsing, and modifying KML, the geo-spatial data language used by Google Earth, Google Maps and a number of other GIS platforms.

"pyKML facilitates working with large and complex KML documents by leveraging the use of basic programming constructs (looping, branching, etc.). In this regard pyKML is similar to libkml, Google's open source C++ library, but takes advantage of the highly readable syntax of the Python programming language and the processing capabilities of the popular lxml Python library," revealed Tyler Erickson, Senior Research Scientist / Engineer, MTRI.

As a simple example, check out this Python script that loops through a text string ("Hello World!") and uses pyKML to create a series of KML Placemarks. You can download the resulting KML document, and below is a screenshot of how it looks in Google Earth.

pyKML Python library for manipulating KML

To get started, browse the project's documentation, install the library, try it out