A python wrapper for the pythonanywhere.com API
Project description
MyPythonAnywhere
A python package to communicate with PythonAnywhere api.
Installation
The beta package is available at PyPi.
Get Started
Requirements
-
Api Token: get your api token from pythonanywhere account page.
-
Determine if your account is US_Based or EU_Based ( It's commonly US. )
-
Your username.
Create Client
from mypythonanywhere import PythonAnywhereClient, AccountType
client = PythonAnywhereClient(
username='MerrilleChoate',
token='API_TOKEN',
account_type=AccountType.UsBased
)
Send Requests
Get cpu usage.
>>> result = client.cpu.get_cpu_usage()
>>> print(result)
# CpuUsage(daily_cpu_limit_seconds=100, next_reset_time='2022-04-17T11:23:40', daily_cpu_total_usage_seconds=0.0)
Get all of your consoles.
>>> result = client.consoles.get_consoles()
>>> print(result)
# [Console(id=24036640, user='MerrilleChoate', executable='python2.7', arguments='', working_directory=None, name='Python2.7 console 24036640', console_url='/user/MerrilleChoate/consoles/24036640/', console_frame_url='/user/MerrilleChoate/consoles/24036640/frame/')]
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for mypythonanywhere-0.0.5rc0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86dec906e2a575d209817cc43d2efbcbf6d46d76d260760c8229bcb21ddb6017 |
|
MD5 | 8fdf0a783f1625721ca67d0849949480 |
|
BLAKE2b-256 | c5a66b71900b5c18789f86dc51a187863341e941090b9e047ee13c1533af54da |
Close
Hashes for mypythonanywhere-0.0.5rc0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03847b1a1589b7ffe59b65618d708f371e8c7a17a2240c0a28d56bba04943424 |
|
MD5 | 1b76bdfc48d632a5c30b6dfcf844102b |
|
BLAKE2b-256 | e3729e992cb203d0a07da3a71d882a8fef67bb5fae0bca46974c2b6fda993fd2 |