{ "info": { "author": "Trevor Watson", "author_email": "wtrevor162@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "pythonanywhere-wrapper\n==============\n\n*A PythonAnywhere API wrapper.*\n\n.. image:: https://travis-ci.org/cfc603/pythonanywhere-wrapper.png?branch=master\n :target: https://travis-ci.org/cfc603/pythonanywhere-wrapper\n\n.. image:: https://codecov.io/github/cfc603/pythonanywhere-wrapper/coverage.svg?branch=master\n :target: https://codecov.io/github/cfc603/pythonanywhere-wrapper?branch=master\n\nUsage\n-----\n\n::\n\n from pythonanywhere_wrapper.client import PythonAnywhere\n\n # If running on a PythonAnywhere terminal, your token and username will\n # be discovered automatically. Be sure to setup your API_TOKEN first.\n\n # For information on setting up your API_TOKEN visit\n # http://help.pythonanywhere.com/pages/API\n API_TOKEN = \"test-token\"\n\n # Your PythonAnywhere Username\n USER = \"test-user\"\n\n client = PythonAnywhere(api_key=API_TOKEN, user=USER)\n\nEndpoints\n---------\n\nConsoles::\n\n # List all your consoles\n response = client.consoles()\n\n # View consoles shared with you\n response = client.consoles.shared_with_you()\n\n # Get console by id\n response = client.consoles(console_id=123456)\n\n # Kill a console by id\n response = client.consoles.delete(console_id=123456)\n\nFiles::\n\n # Start sharing a file\n response = client.files.sharing.create(data={\"path\": \"/path/to/file\"})\n\n # Get sharing status by path\n response = client.files.sharing(path=\"/path/to/file\")\n\n # Stop sharing a file\n response = client.files.sharing.delete(path=\"/path/to/file\")\n\n # List contents of a directory and subdirectories\n response = client.files.tree(path=\"/path/to/directory\")\n\nWebapps::\n\n # List all webapps\n response = client.webapps()\n\n # Create a new webapp\n response = client.webapps.create(data={\n \"domain_name\": \"username.pythonanywhere.com\",\n \"python_version\": \"python27\",\n })\n\n # Get webapp by domain name\n response = client.webapps(domain_name=\"username.pythonanywhere.com\")\n\n # Modify config of a webapp. Follow with reloading webapp.\n response = client.webapps.update(\n domain_name=\"username.pythonanywhere.com\", data={\n \"python_version\": \"3.6\",\n \"virtualenv_path\": \"/path/to/virtualenv\",\n }\n )\n\n # Delete webapp by domain name\n response = client.webapps.delete(domain_name=\"username.pythonanywhere.com\")\n\n # Reload webapp\n response = client.webapps.reload(domain_name=\"username.pythonanywhere.com\")\n\nStatic Files::\n\n # List all static files mappings for a domain\n response = client.webapps.static_files(\n domain_name=\"username.pythonanywhere.com\"\n )\n\n # Create a new static file mapping for a domain. Reload webapp required.\n response = client.webapps.static_files.create(\n domain_name=\"username.pythonanywhere.com\", data={\n \"url\": \"/static/\", \"path\": \"/path/to/static/dir\"\n }\n )\n\n # Get static file mapping by id\n response = client.webapps.static_files(\n domain_name=\"username.pythonanywhere.com\", static_id=123\n )\n\n # Modify a static file mapping. Reload webapp required.\n response = client.webapps.static_files.update(\n domain_name=\"username.pythonanywhere.com\", static_id=123, data={\n \"url\": \"/static/\", \"path\": \"/path/to/static/dir\"\n }\n )\n\n # Delete a static file mapping by id. Reload webapp required.\n response = client.webapps.static_files.delete(\n domain_name=\"username.pythonanywhere.com\", static_id=123\n )\n\nCredit\n------\n\nThis application uses Open Source components. You can find the source code of their open source projects along with license information below. We acknowledge and are grateful to these developers for their contributions to open source.\n\n:Project: chargify-python https://github.com/stevenwei/chargify-python\n:Copyright: Copyright (c) 2010 Hindsight Labs\n:License: (MIT) https://github.com/stevenwei/chargify-python/blob/master/LICENSE\n\n\nHistory\n-------\n\nUNRELEASED\n++++++++++\n\n\n0.2.0 (2017-10-21)\n++++++++++++++++++\n\n* name change from pythonanywhere to pythonanywhere-wrapper\n* Add history\n\n\n0.1.1\n+++++\n\n* Add attribution for chargify-python\n\n\n0.1.0\n+++++\n\n* Initial release on PyPI", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cfc603/pythonanywhere-wrapper", "keywords": "pythonanywhere pythonanywhere-wrapper pythonanywhere_wrapper", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pythonanywhere-wrapper", "package_url": "https://pypi.org/project/pythonanywhere-wrapper/", "platform": "", "project_url": "https://pypi.org/project/pythonanywhere-wrapper/", "project_urls": { "Homepage": "https://github.com/cfc603/pythonanywhere-wrapper" }, "release_url": "https://pypi.org/project/pythonanywhere-wrapper/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "PythonAnywhere API wrapper.", "version": "0.2.0" }, "last_serial": 3268473, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "a8ec83f412bb835353a42c1db80534fe", "sha256": "d149618c4c5e5332848b40a74f16f6d3820104ec13f8393bc0cb5fe496933fe5" }, "downloads": -1, "filename": "pythonanywhere-wrapper-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a8ec83f412bb835353a42c1db80534fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15833, "upload_time": "2017-10-21T16:05:24", "url": "https://files.pythonhosted.org/packages/a0/2c/975a73dfa7b71ede5467359a3ecc59eaed42020f2ce0cf602921341355b2/pythonanywhere-wrapper-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a8ec83f412bb835353a42c1db80534fe", "sha256": "d149618c4c5e5332848b40a74f16f6d3820104ec13f8393bc0cb5fe496933fe5" }, "downloads": -1, "filename": "pythonanywhere-wrapper-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a8ec83f412bb835353a42c1db80534fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15833, "upload_time": "2017-10-21T16:05:24", "url": "https://files.pythonhosted.org/packages/a0/2c/975a73dfa7b71ede5467359a3ecc59eaed42020f2ce0cf602921341355b2/pythonanywhere-wrapper-0.2.0.tar.gz" } ] }