You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/environment-variables.rst
+44-29Lines changed: 44 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,24 +32,37 @@ API_TOKEN
32
32
Optional Variables
33
33
------------------
34
34
35
-
PYTHONANYWHERE_SITE
36
-
~~~~~~~~~~~~~~~~~~~~
35
+
PYTHONANYWHERE_CLIENT
36
+
~~~~~~~~~~~~~~~~~~~~~~
37
37
38
38
**Required:** No
39
39
40
-
**Default:** ``www.pythonanywhere.com`` (or ``www.`` + ``PYTHONANYWHERE_DOMAIN`` if that is set)
40
+
**Default:** Not set (library identifies itself without client information)
41
41
42
-
**Description:** Override the hostname used for API requests. Useful for testing against different PythonAnywhere environments or when using EU servers.
42
+
**Description:** Identifies the client application using ``pythonanywhere-core`` in API requests. This information is included in the User-Agent header and helps PythonAnywhere understand API usage patterns and improve service analytics.
43
43
44
-
.. note::
45
-
When running on PythonAnywhere, this variable is automatically set in the environment
46
-
to match your system location (e.g., ``www.pythonanywhere.com`` or ``eu.pythonanywhere.com``).
**Default:** Not set (library identifies itself without client information)
91
+
**Default:** ``www.pythonanywhere.com`` (or ``www.`` + ``PYTHONANYWHERE_DOMAIN`` if that is set)
79
92
80
-
**Description:** Identifies the client application using ``pythonanywhere-core`` in API requests. This information is included in the User-Agent header and helps PythonAnywhere understand API usage patterns and improve service analytics.
93
+
**Description:** Override the hostname used for API requests. Useful for testing against different PythonAnywhere environments or when using EU servers.
**Default:** The current system username (via :func:`getpass.getuser`)
111
+
112
+
**Description:** Override the PythonAnywhere username used for constructing API endpoints. When running outside of PythonAnywhere (e.g., from a local machine), the system username often won't match your PythonAnywhere username, so this variable lets you specify the correct one.
0 commit comments