bryanyang0528 / ksql-python

A python wrapper for the KSQL REST API.
MIT License
159 stars 67 forks source link

Support new query-stream API with HTTP/2 #79

Closed harlev closed 4 years ago

harlev commented 4 years ago

Added optional support for the new HTTP/2 endpoint for queries, requested in https://github.com/bryanyang0528/ksql-python/issues/77

This is a non breaking change. The new endpoint will only be used when use_http2=True is passed into Query in the client.

Since it looks like Python's requests does not support HTTP/2, added the Hyper package.

The test for Query was enhanced to test both HTTP/1.1 and HTTP/2 with the /query and /query-stream endpoints receptively

harlev commented 4 years ago

In a later PR there should be support for the other new endpoints

bryanyang0528 commented 4 years ago

@harlev that's great. Let met know if you complete this cool feature.

harlev commented 4 years ago

@bryanyang0528 last two APIs are implemented

bryanyang0528 commented 4 years ago

@harlev I merged #78 but some conflict happened. Would you mind helping resolve the conflict and push again?

codecov[bot] commented 4 years ago

Codecov Report

Merging #79 into master will decrease coverage by 10.00%. The diff coverage is 11.84%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #79       +/-   ##
===========================================
- Coverage   75.25%   65.24%   -10.01%     
===========================================
  Files           7        7               
  Lines         396      469       +73     
  Branches       54       66       +12     
===========================================
+ Hits          298      306        +8     
- Misses         80      145       +65     
  Partials       18       18               
Impacted Files Coverage Δ
ksql/api.py 49.48% <8.95%> (-21.06%) :arrow_down:
ksql/client.py 73.17% <33.33%> (-6.83%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e74b650...b0d6828. Read the comment docs.

bryanyang0528 commented 4 years ago

@harlev Thanks for your contribution. Nice implementation.