r = requests.get('https://github.com/timeline.json', timeout=5, stream=True)
content = r.raw.read(100000 + 1, decode_content=True)
if len(content) > 100000:
    raise ValueError('Too large a response')
print(content)
print(json.loads(content))
http request with timeout, maximum size and connection pooling