|
|
@@ -7,7 +7,7 @@ import time |
|
|
|
import sys |
|
|
|
import re |
|
|
|
import os |
|
|
|
import json |
|
|
|
import simplejson as json |
|
|
|
import urlparse |
|
|
|
import urllib |
|
|
|
import pycurl |
|
|
@@ -233,7 +233,7 @@ class Client(object): |
|
|
|
"path": path |
|
|
|
} |
|
|
|
if start is not None: |
|
|
|
params["start"] = repr(start) # keep full precision |
|
|
|
params["start"] = repr(start) # use repr to keep precision |
|
|
|
if end is not None: |
|
|
|
params["end"] = repr(end) |
|
|
|
|
|
|
@@ -249,15 +249,16 @@ class Client(object): |
|
|
|
|
|
|
|
def stream_extract(self, path, start = None, end = None, bare = False): |
|
|
|
""" |
|
|
|
Return a generator that yields chunks of ascii-formatted data |
|
|
|
from the stream. Multiple requests are made to the server if |
|
|
|
the results get truncated. |
|
|
|
Extract data from a stream. Returns a generator that yields |
|
|
|
chunks of ASCII-formatted data that matches the database |
|
|
|
layout for the given path. Multiple requests are made to the |
|
|
|
server if shorter requests get truncated. |
|
|
|
""" |
|
|
|
params = { |
|
|
|
"path": path |
|
|
|
} |
|
|
|
if start is not None: |
|
|
|
params["start"] = repr(start) # keep full precision |
|
|
|
params["start"] = repr(start) # use repr to keep precision |
|
|
|
if end is not None: |
|
|
|
params["end"] = repr(end) |
|
|
|
params["bare"] = bare |
|
|
|