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 mypythonwnywhere 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.4rc0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5c56beb9d54065af8acdeecd91d3c252600c505caf3eba3d3086abbf9004c7d |
|
MD5 | f7f89c9ccad738e2fd6ac96438cb99b5 |
|
BLAKE2b-256 | b559d1453290051125f6b90753f0515da1347931193d869852f3b18be5683ca1 |
Close
Hashes for mypythonanywhere-0.0.4rc0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aafd5b255e0ae605d58085acf675c41bdd8203f70588dcf79c31c69dca8e00f3 |
|
MD5 | effec78e114d1e89b5882839806de62f |
|
BLAKE2b-256 | b3ec0fa12696428e2e297fd7b89570d1647a4ff0c9f4fc567bbfe84f80f5bdd8 |