File tree 1 file changed +10
-10
lines changed
http/get_simple/python/client
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 26
26
response = urllib .request .urlopen ('http://localhost:8008' )
27
27
content_type = response .headers ['Content-Type' ]
28
28
if content_type != ARROW_STREAM_FORMAT :
29
- raise ValueError (f"Expected { ARROW_STREAM_FORMAT } , got { content_type } " )
29
+ raise ValueError (f"Expected { ARROW_STREAM_FORMAT } , got { content_type } " )
30
30
31
31
batches = []
32
32
33
33
with pa .ipc .open_stream (response ) as reader :
34
- schema = reader .schema
35
- try :
36
- while True :
37
- batches .append (reader .read_next_batch ())
38
- except StopIteration :
39
- pass
34
+ schema = reader .schema
35
+ try :
36
+ while True :
37
+ batches .append (reader .read_next_batch ())
38
+ except StopIteration :
39
+ pass
40
40
41
41
# or:
42
- #with pa.ipc.open_stream(response) as reader:
43
- # schema = reader.schema
44
- # batches = [b for b in reader]
42
+ # with pa.ipc.open_stream(response) as reader:
43
+ # schema = reader.schema
44
+ # batches = [b for b in reader]
45
45
46
46
end_time = time .time ()
47
47
execution_time = end_time - start_time
You can’t perform that action at this time.
0 commit comments