Skip to content
Myr

Use shebang-style headers in environment variables docs (#1260)

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

authored by Florimond Manca · committed by GitHub · parent 42c6686 · Browse files · 1 file+6 added−12 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+6 added−12 removed

  • other:+6 added−12 removed

1 file+6 added−12 removed

modified:docs/environment_variables.md+6 added-12 removed
1Environment Variables2=====================1# Environment Variables23The HTTPX library can be configured via environment variables.4Environment variables are used by default. To ignore environment variables, `trust_env` has to be set `False`. There are two ways to set `trust_env` to disable environment variables:5
1 unmodified line
7* Using the top-level API, such as `httpx.get("<url>", trust_env=False)`.89Here is a list of environment variables that HTTPX recognizes and what function they serve:1012`HTTPX_LOG_LEVEL`13-----------------11## `HTTPX_LOG_LEVEL`1213Valid values: `debug`, `trace` (case-insensitive)1415If set to `debug`, then HTTP requests will be logged to `stderr`. This is useful for general purpose reporting of network activity.
55 unmodified lines
71TRACE [2019-11-06 19:18:56] httpx._dispatch.connection_pool - release_connection connection=HTTPConnection(origin=Origin(scheme='https' host='www.google.com' port=443))72TRACE [2019-11-06 19:18:56] httpx._dispatch.connection - close_connection73```7477`SSLKEYLOGFILE`78-----------75## `SSLKEYLOGFILE`7677Valid values: a filename7879If this environment variable is set, TLS keys will be appended to the specified file, creating it if it doesn't exist, whenever key material is generated or received. The keylog file is designed for debugging purposes only.
25 unmodified lines
105CLIENT_HANDSHAKE_TRAFFIC_SECRET XXXX106CLIENT_TRAFFIC_SECRET_0 XXXX107```108112`SSL_CERT_FILE`113-----------109## `SSL_CERT_FILE`110111Valid values: a filename112113if this environment variable is set then HTTPX will load
5 unmodified lines
119```console120SSL_CERT_FILE=/path/to/ca-certs/ca-bundle.crt python -c "import httpx; httpx.get('https://example.com')"121```122127`SSL_CERT_DIR`128-----------123## `SSL_CERT_DIR`124125Valid values: a directory126127if this environment variable is set then HTTPX will load
5 unmodified lines
133```console134SSL_CERT_DIR=/path/to/ca-certs/ python -c "import httpx; httpx.get('https://example.com')"135```136142`HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`143----------------------------------------137## `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`138139Valid values: A URL to a proxy140141Sets the proxy to be used for `http`, `https`, or all requests respectively.
9 unmodified lines