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().content
print(cpu_usage)

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

Available methods

  • always_on
    • create
    • delete
    • get_info
    • list
    • restart
    • update
  • console
    • create
    • get_info
    • get_output
    • kill
    • list
    • list_shared
    • send_input
  • cpu
    • get_info
  • file
    • delete
    • get_content
    • get_sharing_status
    • get_tree
    • start_sharing
    • stop_sharing
    • upload
  • python
    • get_python3_version
    • set_python3_version
    • get_python_version
    • set_python_version
    • get_sar_version
    • set_sar_version
  • scheduled_task
    • create
    • delete
    • get_info
    • list
    • update
  • students
    • delete
    • list
  • system
    • get_current_image
    • set_image
  • webapp
    • list
    • create
    • get_info
    • update
    • delete
    • enable
    • disable
    • reload
    • add_ssl
    • get_ssl_info
    • delete_ssl
    • add_static_file
    • get_static_file_info
    • list_static_files
    • update_static_file
    • delete_static_file
    • add_static_header
    • get_static_header_info
    • update_static_header
    • delete_static_header
    • list_static_headers

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-1.2.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

pypawapi-1.2.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pypawapi-1.2.0.tar.gz
Algorithm Hash digest
SHA256 32735f1f80bf3b002a76fc6076aed8c906ec7978048614db5c6adf97a40f2b95
MD5 ba014d93b330e62f285bc9522c50d42b
BLAKE2b-256 f2679cf0989d9df2c3f017e14ab206fb941b0a5e2cfa037acd57835f096d0285

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pypawapi-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.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-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5de5d8458279da2f0cb70c0fd751e769d03911b760ea50f340f61ed1ebbb0536
MD5 563183e9c1fdce726a9f50f0d18a1794
BLAKE2b-256 de39888347f0b4800caa83d7448b10528827498e09a1cd84a311f69719a9c4b9

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