{ "info": { "author": "imaging8896", "author_email": "imaging8896@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Formatted APIs presentation for testing\nCan be used as part of RESTful API test framework\n\n# Install\nsudo pip3 install restapi3\n\n# Usage\n1. 'Get' : 'query_strings'\n1. 'Post' : 'data', 'files', 'json'\n1. 'Put' : 'data', 'json'\n1. 'Delete'\n\n```Python\nfrom restapi3.api import BaseAPIs, API\n\nclass Video_Model(BaseAPIs):\n\n def __init__(self):\n BaseAPIs.__init__(self, \"http://XXXX\")\n self.headers = {'X-Device-ID': 'YA'}\n\n @API\n def get_video(self):\n return {\n 'path': '/v1/A/C/X',\n 'headers': self.headers,\n 'method': 'Get',\n 'query_strings': {\n 'first_str': 'val space, yee',\n 'second_str': 123\n },\n 'json': {\n 'a': 123,\n 'b': ['123', '234']\n },\n 'files': {\n 'image': open('/Users/tedchen/Desktop/test.png', 'rb')\n }\n }\n\n\nr = Video_Model().get_video() # Return for requests Response object\n\nif r.status_code != 200:\n raise Exception(\"Fail to call API\")\nr_json = r.json()\n```\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/imaging8896/restapi3", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "restapi3", "package_url": "https://pypi.org/project/restapi3/", "platform": "", "project_url": "https://pypi.org/project/restapi3/", "project_urls": { "Homepage": "https://github.com/imaging8896/restapi3" }, "release_url": "https://pypi.org/project/restapi3/0.0.1/", "requires_dist": [ "setuptools", "requests" ], "requires_python": "", "summary": "Formatted APIs presentation for testing.", "version": "0.0.1" }, "last_serial": 4243822, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "bdae955b304c87d4a9d91e783135bc9f", "sha256": "cb5323a5678f003bc58d91ddba4d7a7e59b08b9ffaf9fa38ad9e26b9c51d8498" }, "downloads": -1, "filename": "restapi3-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "bdae955b304c87d4a9d91e783135bc9f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4915, "upload_time": "2018-09-06T07:53:40", "url": "https://files.pythonhosted.org/packages/a7/39/f899e8ad8d348f05e02e265625995b25def0637644b0f4563fcdd9dadc5d/restapi3-0.0.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bdae955b304c87d4a9d91e783135bc9f", "sha256": "cb5323a5678f003bc58d91ddba4d7a7e59b08b9ffaf9fa38ad9e26b9c51d8498" }, "downloads": -1, "filename": "restapi3-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "bdae955b304c87d4a9d91e783135bc9f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4915, "upload_time": "2018-09-06T07:53:40", "url": "https://files.pythonhosted.org/packages/a7/39/f899e8ad8d348f05e02e265625995b25def0637644b0f4563fcdd9dadc5d/restapi3-0.0.1-py3-none-any.whl" } ] }