Metadata-Version: 2.1
Name: mypythonanywhere
Version: 0.0.4rc0
Summary: A python wrapper for the pythonanywhere.com API
Home-page: https://github.com/immmdreza/mypythonanywhere
Author: immmdreza
Author-email: ir310022@gmail.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/immmdreza/mypythonanywhere/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE

# MyPythonAnywhere

A python package to communicate with [PythonAnywhere](https://help.pythonanywhere.com/pages/API) api.

## Installation

The beta package is available at [PyPi](https://pypi.org/project/mypythonanywhere).

## Get Started

### Requirements

1. Api Token: get your api token from [pythonanywhere account page](https://www.pythonanywhere.com/user/MerrilleChoate/account/).

2. Determine if your account is US_Based or EU_Based ( It's commonly US. )

3. Your username.

### Create Client

``` py
from mypythonwnywhere import PythonAnywhereClient, AccountType

client = PythonAnywhereClient(
    username='MerrilleChoate',
    token='API_TOKEN',
    account_type=AccountType.UsBased
)
```

### Send Requests

Get cpu usage.

``` py
>>> 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.

``` py
>>> 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/')]
```

...


