Python GZIP clarification

169 views
Skip to first unread message

The Random Suit

unread,
Jan 7, 2016, 12:41:58 PM1/7/16
to Google's DoubleClick Campaign Manager API Forum
I want to be sure that when i download file contents that they are being compressed via GZIP. The DFA reporting documentation states that you need to add an accept-encoding header and change the user-client in order to do this, however I am not sure this is needed when using the google python API for requests. According to the documentation the python API client automatically requests/receives everything in a GZIP format then automatically decompresses the data for you. So I want to verify that my understanding is correct, that whenever I download a report using the Python API the file is being sent as a gzip, then the contents are automatically decompressed when they are returned to python?

Jonathon Imperiosi (DCM API Team)

unread,
Jan 7, 2016, 4:50:46 PM1/7/16
to Google's DoubleClick Campaign Manager API Forum, lea...@gmail.com
Hi there,

The accept-encoding header method for enabling gzip compression is a common paradigm across most Google APIs. There's nothing special about the process for the DCM API specifically, so I suspect this should just work in the Python client, based on the documentation you linked. That said, I'm not terribly familiar with the inner workings of this client library, so you may want to verify on your end (by enabling HTTP logging) or follow up on a client library specific support channel.

Regards,
- Jonathon Imperiosi, DCM API Team
Reply all
Reply to author
Forward
0 new messages