CustomSession

class app.util.requests.session.CustomSession[source]

Bases: CacheMixin, LimiterMixin, Session

Custom session class that includes caching and rate limiting capabilities by default.

Inheritance diagram of CustomSession

Inheritance Diagram for CustomSession

Methods

__init__(*args, **kwargs)

Attributes

headers

A case-insensitive dictionary of headers to be sent on each Request sent from this Session.

auth

Default Authentication tuple or object to attach to Request.

proxies

Dictionary mapping protocol or protocol and host to the URL of the proxy (e.g. {'http': 'foo.bar:3128', 'http://host.name': 'foo.bar:4012'}) to be used on each Request.

hooks

Event-handling hooks.

params

Dictionary of querystring data to attach to each Request.

stream

Stream response content default.

verify

SSL Verification default.

cert

SSL client certificate default, if String, path to ssl client cert file (.pem).

max_redirects

Maximum number of redirects allowed.

trust_env

Trust environment settings for proxy configuration, default authentication and similar.

cookies

A CookieJar containing all currently outstanding cookies set on this session.

__init__(*args, **kwargs)[source]