Resources
- class resources.CPU[source]
Interface for PythonAnywhere CPU resources API.
Uses pythonanywhere_core.base :method: get_api_endpoint to create url, which is stored in a class variable CPU.base_url, then calls call_api with appropriate arguments to execute CPU resource actions.
- Methods:
CPU.get_cpu_usage(): Get current CPU usage information.
- get_cpu_usage()[source]
Get current CPU usage information.
- Returns:
dictionary with CPU usage information including daily limit, total usage, and next reset time
- Raises:
PythonAnywhereApiException – if API call fails