Skip to main content

API wrapper for pythonanywhere

Project description

pawapi

pawapi is a Python package providing access to the PythonAnywhere API.

Install

Use pip to install the latest version:

 $ pip install --upgrade pypawapi --user

Usage

Get your token

from pawapi import Pawapi, Python3

TOKEN = "<your_token>"
USER = "<your_username>"

api = Pawapi(USER, TOKEN)
cpu_usage = api.cpu.get_info()
print(cpu_usage)

domain = f"{USER}.pythonanywhere.com"
api.webapp.create(domain, Python3.PYTHON39)
app = api.webapp.list()[-1]
print(app["id"])

Docs

$ python -c "import pawapi; help(pawapi.Pawapi)"

LICENSE

The MIT License (MIT)

Copyright (c) 2019 Maraudeur

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypawapi-2.0.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

pypawapi-2.0.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file pypawapi-2.0.0.tar.gz.

File metadata

  • Download URL: pypawapi-2.0.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for pypawapi-2.0.0.tar.gz
Algorithm Hash digest
SHA256 d7d4544d6dbee1d5e364ac621fd456510caadee426c1b10ca23ac9a659e19385
MD5 1f8e28576cc5149eebc053240baaf846
BLAKE2b-256 f43de2f1043d5656c7798804b10d2299f304ca13ded6f54d43ffa579a42522d2

See more details on using hashes here.

File details

Details for the file pypawapi-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: pypawapi-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for pypawapi-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb0f5dbe7e3bb2926e9a2a0e0c39fe738443eec90394d2f56c5140c0d8f66921
MD5 710d84cdc7ad7232418e91bea66918a2
BLAKE2b-256 75b0d4539a912ee51ca95cd6a449f89965116c5efb41033cf0a554e6f0b06452

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page