{ "info": { "author": "Peter Salas", "author_email": "psalas@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# Requestests\n\nThis is an testing/validation extension on top of the ever-so-popular [requests library](https://github.com/kennethreitz/requests). The library relies on duck typing to add testability of a response object. Given that, leveraging the validation mechanism in `requestests` is both lightweight and simple!\n\n## Installation\n\nThe library can be installed via:\n\n\tpip install requestests\n\t\n## Usage\n\nUsing the built-in validations in `requestests` is intended to be an extremely intuitive extension of using `requests`:\n\n\t>>> import requestests\n\t>>> r = requestests.get('https://api.github.com/user', auth=('user', 'pass'))\n\t>>> r.validate_code(requests.code.ok)\n\t>>> r.validate_header_like('Content-Type', 'application/json')\n\t>>> r.encoding\n\t'utf-8'\n\t>>> r.text\n\tu'{\"type\":\"User\"...'\n\t>>> r.json()\n\t{u'disk_usage': 368627, u'private_gists': 484, ...}\n\t\nWhat is happening is that the assertion operation is being abstracted out. The traditional method of asserting on the response:\n\n\tr = requests.get('https://api.github.com/user')\n\tassert r.status_code == requests.codes.ok, \"Expecting a 200 response code\"\n\t\ncan be simplified to this:\n\t\n\tr = requestests.get('https://api.github.com.user')\n\tr.validate_code(requests.code.ok)\n\t\n\t## Or even to this\n\tr = requestests.get('https://api.github.com.user').validate_code(requests.code.ok)\n\t\nValidations follow the builder paradigm, so operations can be chained together:\n\n\tentity = requestests.get('https://api.github.com.user') \\\n\t\t\t\t.validate_code(requests.code.ok) \\\n\t\t\t\t.validate_header_like('Content-Type', 'application/json') \\\n\t\t\t\t.json()\n\nWhat happens in this scenario is that if any of the validations fails, an `AssertionError` is raised; otherwise, at the end of this requests, you would have:\n\n1. Validated that the request was successful\n2. Validated the 'Content-Type' is 'application/json'\n3. and deserialized the response.text\n\n\n## Documentation\n\nThe projects homepage can be found [here](https://github.com/gradeawarrior/requestests).\n\n## Package Dependencies:\n\n* [requests](https://github.com/kennethreitz/requests) - Requests is the only Non-GMO HTTP library for Python, safe for human consumption\n* [jsonstruct](https://github.com/initialxy/jsonstruct) - jsonstruct is a library for two way conversion of typed Python object and JSON\n\n# Copyright\n\nCopyright (c) 2016 Peter Salas. See LICENSE for\nfurther details.\n\n\nRelease History\n===============\n\n\n### 1.2.2 (2017-01-09)\n\n**New Features**\n\n- Fixing major issue with installing requestests v1.2.1 from PyPi server\n\n### 1.2.1 (2017-01-09)\n\n**New Features**\n\n- Fixing major issue with installing requestests v1.2.0 from PyPi server\n- Updates to licensing information\n\n### 1.2.0 (2016-11-16)\n\n**New Features**\n\n- Migration of ownership to personal Github account for continued support and enhancements\n- Update of documentation for easier readability on both github and pypi\n- Development enhancements to use virtualenv versus system python environment\n\n### 1.1.2 (2016-09-29)\n\n**New Features**\n\n- A more comprehensive set of Validation methods for evaluating things like (i) response codes, (ii) response content, (iii) response headers, and (iv) time-to-last-byte (ttlb)\n- Adding better assertion debug messages for determining what failed and why. For example: `http://www.google.com/foobar - 200 == 301`, which basically means that the request to `http://www.google.com/foobar` failed because we were expecting `200` but got a `301`\n- Adding several unit-tests for ensuring the code continues to work\n\n### 1.0.0 (2016-06-01)\n\n**New Features**\n\n- First release of requestests testing tool for the world", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://python-requests.org", "keywords": "testing,requests,requestests,rest,restest", "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "requestests", "package_url": "https://pypi.org/project/requestests/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/requestests/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://python-requests.org" }, "release_url": "https://pypi.org/project/requestests/1.2.2/", "requires_dist": null, "requires_python": null, "summary": "Python HTTP Tests for Humans.", "version": "1.2.2" }, "last_serial": 2563073, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "e13bbdc626764f19e8363f07590193e7", "sha256": "830a783e7b4c8c199b56319c2ac495eb68b0b570139d7ebab29c44783f4c4dfc" }, "downloads": -1, "filename": "requestests-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e13bbdc626764f19e8363f07590193e7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5570, "upload_time": "2016-06-01T15:04:53", "url": "https://files.pythonhosted.org/packages/45/0c/e91302af558e7e5c804f279a16203c07f27b21679200484b2b6f4b1a2171/requestests-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a1c0007d95253e3ad0faef0cf0c2402e", "sha256": "e35ad17928453ac6062df0fe896e554d059dcc9b21d0f56c82ac9922e45309a2" }, "downloads": -1, "filename": "requestests-1.0.0.tar.gz", "has_sig": false, "md5_digest": "a1c0007d95253e3ad0faef0cf0c2402e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5889, "upload_time": "2016-06-01T15:04:43", "url": "https://files.pythonhosted.org/packages/ee/23/91cefaa6729a381ae451b16effb61eb9af38dbcbd13fa949fd0d93702e31/requestests-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "92906177ba2084bb5c74bcb64628cdf7", "sha256": "40cb0427752f5a89f278674958971936e1454b06f34aa15620e5d9883435ef5e" }, "downloads": -1, "filename": "requestests-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "92906177ba2084bb5c74bcb64628cdf7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10008, "upload_time": "2016-06-06T00:29:16", "url": "https://files.pythonhosted.org/packages/42/06/0e0a8045a5713ca4bc5d327407060214fafbb23955cb59ed5f93ed0aabcb/requestests-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8e76c2a4c30daedb916ddf478241a34f", "sha256": "f7ad7bbc3edf78e4aac414a8cbeb83229913d4604a9b03f9cd1114c32f8a6f1c" }, "downloads": -1, "filename": "requestests-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8e76c2a4c30daedb916ddf478241a34f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8182, "upload_time": "2016-06-06T00:29:12", "url": "https://files.pythonhosted.org/packages/dc/ad/785bbc1c8f97df90c59fdeddfbac3c2c392351b13e12f5a958ec0849d813/requestests-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "274dd736cd8a7ac806c350e5ca9b23d8", "sha256": "dd72b0c59372f4abe27bd6585aa809ea3970d166a2ce607fe35c09172b350925" }, "downloads": -1, "filename": "requestests-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "274dd736cd8a7ac806c350e5ca9b23d8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10641, "upload_time": "2016-09-29T00:13:55", "url": "https://files.pythonhosted.org/packages/64/ba/5280f4e66aa09a6629bc09ecc268f99f9b0de9e4f67ffee07309b5a70ffe/requestests-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "106add1c23e2d883b05596efe6c5a253", "sha256": "4b9c4f5ae92fe5e3e40b24c4eac9e38d66ebfdab91b2054daf064e600d116832" }, "downloads": -1, "filename": "requestests-1.1.0.tar.gz", "has_sig": false, "md5_digest": "106add1c23e2d883b05596efe6c5a253", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9583, "upload_time": "2016-09-29T00:13:52", "url": "https://files.pythonhosted.org/packages/bd/58/bc4e75385efeb4c26a090f9e3c6f271ff10e741295b915431f1fbc73132b/requestests-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "fa6fda151210d47c42ca2bb6589e17c7", "sha256": "5ce8bcc4afbba89fdff9f9817fdef9f43d533edb2c0189fd14dae6b8c10f7b96" }, "downloads": -1, "filename": "requestests-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fa6fda151210d47c42ca2bb6589e17c7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10815, "upload_time": "2016-09-29T18:10:38", "url": "https://files.pythonhosted.org/packages/d6/cc/00dbbf7f3e2919dfe1b60ca8fe1d63355210c9ee34a237fdb13c50ba7d4b/requestests-1.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "016833893ecd2c11cddef8b894ec8d51", "sha256": "58516a8f559860d233b1f636fcb2c5b41c27ddf5376e71cdf9a115682c6f54f5" }, "downloads": -1, "filename": "requestests-1.1.1.tar.gz", "has_sig": false, "md5_digest": "016833893ecd2c11cddef8b894ec8d51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9747, "upload_time": "2016-09-29T18:10:35", "url": "https://files.pythonhosted.org/packages/07/b2/9c71458f42d6846de775dc135572c03abf92b16c5aeaf3e020d4312ad689/requestests-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "a92e6d181b9f08aa0a9633955a57382b", "sha256": "f8daf875b029fda3c1f83ad81f37b20c168af8731178b8fd9a0d28ea0971bb77" }, "downloads": -1, "filename": "requestests-1.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a92e6d181b9f08aa0a9633955a57382b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10814, "upload_time": "2016-09-29T20:28:12", "url": "https://files.pythonhosted.org/packages/e5/46/83c1416fcc8a75183ede1093aeefe789deeee08e0c86afcde4628d014d7e/requestests-1.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7b96986cfb98ad017590927b8d28bf30", "sha256": "9b627d9140b4d7771c2a69b9efe78b16a8077b59224d398a30e3f0336ccb3a5d" }, "downloads": -1, "filename": "requestests-1.1.2.tar.gz", "has_sig": false, "md5_digest": "7b96986cfb98ad017590927b8d28bf30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9741, "upload_time": "2016-09-29T20:28:09", "url": "https://files.pythonhosted.org/packages/39/b2/96432f6b80d835e8935e957c8fd7ee9cbcbe57e23462d6c2f4167953e541/requestests-1.1.2.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "f3e1d0d4c9508887ae105ac066152e44", "sha256": "54bf26629419814d08dcd21c5c96c494a9c6af34082244640a2328fd60fe3e6d" }, "downloads": -1, "filename": "requestests-1.2.0.tar.gz", "has_sig": false, "md5_digest": "f3e1d0d4c9508887ae105ac066152e44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8781, "upload_time": "2016-11-16T08:00:58", "url": "https://files.pythonhosted.org/packages/5a/bc/4acc100fb75f0853a19e031fa5c7fcb958435ea28c51270997392dc1e480/requestests-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "20ef47f545512cd2e89f6ce35947082e", "sha256": "55f07d9b135343fae0f3f213f99fb35f9e2c116b5c437f2d7e250b5cdbae6735" }, "downloads": -1, "filename": "requestests-1.2.1.tar.gz", "has_sig": false, "md5_digest": "20ef47f545512cd2e89f6ce35947082e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8859, "upload_time": "2017-01-09T19:40:55", "url": "https://files.pythonhosted.org/packages/92/8f/8c949ad0892aba06a5247163bd16b8e0c0a0d917a791bb96b26dee78a4a1/requestests-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "73a4acae6c6368ca31bf6687267d75ae", "sha256": "1497b72fb260044c1a58244bab9ec38c344facaf2040150f39eabe663f96d55b" }, "downloads": -1, "filename": "requestests-1.2.2.tar.gz", "has_sig": false, "md5_digest": "73a4acae6c6368ca31bf6687267d75ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8905, "upload_time": "2017-01-09T20:43:16", "url": "https://files.pythonhosted.org/packages/6a/4d/e48c34c7fd92df4aa3aa2ec42251685c28783f9b47c06e2e0dc95bdca9e1/requestests-1.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "73a4acae6c6368ca31bf6687267d75ae", "sha256": "1497b72fb260044c1a58244bab9ec38c344facaf2040150f39eabe663f96d55b" }, "downloads": -1, "filename": "requestests-1.2.2.tar.gz", "has_sig": false, "md5_digest": "73a4acae6c6368ca31bf6687267d75ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8905, "upload_time": "2017-01-09T20:43:16", "url": "https://files.pythonhosted.org/packages/6a/4d/e48c34c7fd92df4aa3aa2ec42251685c28783f9b47c06e2e0dc95bdca9e1/requestests-1.2.2.tar.gz" } ] }