Skip to main content

Session support to tornado.httpclient.

Project description

A mimic inspired by the session feature in Requests, it adds support to Tornado that allows you to persist context such as cookies and other parameters across requests’ fetching from tornado.httpclient.

THIS IS SESSION ABOUT CLIENT, NOT SERVER!

Installation

pip install tornado-httpclient-session

Usage

from tornado.httpclient import HTTPClient

from httpclient_session import Session

s = Session(HTTPClient) # AsyncHTTPClient default

r = s.fetch('https://github.com')
print(r.headers['set-cookie']) # Inspect cookies returnd from Github

r = s.fetch('https://github.com') # Fetching carrys cookies
print(r.request.headers['cookie']) # Inspect cookies attached

Testing

python setup.py test

Or for all supported environments:

tox

Development Progress

Persistences of:

  • Cookies ✔

  • Referrer ✘

  • Authorization ✘

Any Suggestions Welcome!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tornado-httpclient-session-0.2.5.tar.gz (7.9 kB view details)

Uploaded Source

File details

Details for the file tornado-httpclient-session-0.2.5.tar.gz.

File metadata

File hashes

Hashes for tornado-httpclient-session-0.2.5.tar.gz
Algorithm Hash digest
SHA256 761fd19b24188cd47f48aa749060463af94db3342e1cb53f328b37b91b2d8b8b
MD5 d9a514f5bf216ae4ac84fa2327c10911
BLAKE2b-256 cfb3614eaf28f80adbf13d69c9505a5053e190b9c5095017b058ed188ae7d9e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page