druid-io / pydruid

A Python connector for Druid
Other
506 stars 194 forks source link

Added optional extra_headers parameter #173

Open wjdecorte opened 4 years ago

wjdecorte commented 4 years ago

Allowing for extra headers to be included in the request to Druid opens the ability to send "Accept-Encoding: gzip" and get the data returned from Druid in compressed format. The code was also updated to decompress the data if the response header included "Content-Encoding: gzip".

wjdecorte commented 4 years ago

Flake8 fails on the pre-commit hook due to lines being too long in test_client.py. Altering the problem lines in the test causes it to fail. I had to uninstall the pre-commit hooks in order to commit the code successfully. Either the Flake8 hook needs to be updated to ignore long lines or the tests need to be updated to not have long lines.