Skip to content
Myr

Configurations

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 1708876 · Browse files · 1 file+11 added−27 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+11 added−27 removed

  • other:+11 added−27 removed

1 file+11 added−27 removed

modified:requests/defaults.py+11 added-27 removed
4 unmodified lines
5~~~~~~~~~~~~~~~~~67This module provides the Requests configuration defaults.89settings parameters:9Configurations:1011- :base_headers: - Sets default User-Agent to `python-requests.org`12- :accept_gzip: - Whether or not to accept gzip-compressed data13- :proxies: - http proxies?14- :verbose: - display verbose information?15- :timeout: - timeout time until request terminates16- :max_redirects: - maximum number of allowed redirects?17- :decode_unicode: - whether or not to accept unicode?11:base_headers: Default HTTP headers.12:verbose: Stream to write request logging to.13:timeout: Seconds until request timeout.14:max_redirects: Maximum njumber of redirects allowed within a request.15:decode_unicode: Decode unicode responses automatically?16:keep_alive: Reuse HTTP Connections?17:max_retries: The number of times a request should be retried in the event of a connection failure.18:safe_mode: If true, Requests will catch all errors.19:pool_maxsize: The maximium size of an HTTP connection pool.20:pool_connections: The number of active HTTP connection pools to use.2122"""2324from . import __version__
6 unmodified lines
31 'Accept-Encoding': ', '.join(('identity', 'deflate', 'compress', 'gzip')),32 'Accept': '*/*'33}343233#: Stream to log requests to.35defaults['verbose'] = None3536#: Seconds until timeout.36defaults['timeout'] = None3839#: Maximum number of redirects allowed within a request.37defaults['max_redirects'] = 304142#: Should Requests decode unicode?38defaults['decode_unicode'] = True4445#: Reuse HTTP Connections?39defaults['keep_alive'] = True4748#: The number of active HTTP connection pools to use at a time.40defaults['pool_connections'] = 105051#: The maximium size of an HTTP connection pool.41defaults['pool_maxsize'] = 15354#: The number of times a request should be retried in the event of a55#: connection failure.42defaults['max_retries'] = 05758#: If true, Requests will catch all errors.43defaults['safe_mode'] = False