Skip to main content

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!

Metadata

Release files for tornado-httpclient-session 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tornado-httpclient-session 0.2.5
File Size Uploaded
tornado-httpclient-session-0.2.5.tar.gz 7.9 kB Details

Release files / tornado-httpclient-session-0.2.5.tar.gz

Download URL tornado-httpclient-session-0.2.5.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
761fd19b24188cd47f48aa749060463af94db3342e1cb53f328b37b91b2d8b8b
BLAKE2b-256 checksum
How to use checksums
cfb3614eaf28f80adbf13d69c9505a5053e190b9c5095017b058ed188ae7d9e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.5 This release

1 release file

0.2.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page