Base

base.call_api(url: str, method: str, **kwargs) Response[source]

Calls PythonAnywhere API with given url and method.

Parameters:
  • url – url to call

  • method – HTTP method to use

  • kwargs – additional keyword arguments to pass to requests.request

Returns:

requests.Response object

Raises:

Client identification can be provided via PYTHONANYWHERE_CLIENT environment variable (e.g., “pa/1.0.0” or “mcp-server/0.5.0”) to help with usage analytics.

base.get_username() str[source]

Returns PythonAnywhere username from PYTHONANYWHERE_USERNAME environment variable, falling back to getpass.getuser().