{ "info": { "author": "Josue Kouka", "author_email": "josuebrunel@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2", "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", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Logged Requests\n===============\n\n|Build Status| |Documentation Status|\n\n**logged_requests** is a simple wrapper around the *requests.Session* object. It captures *input and output* data of a *requests.Session* object.\n\n\nInstallation\n============\n\n.. code:: python\n\n pip install logged_requests\n\nQuickstart\n----------\n\n.. code:: python\n\n >>> url = 'https://httpbin.org/post'\n >>> from logged_requests import LoggedRequests\n >>> req = LoggedRequests()\n >>> resp = req.post(url, json={\"name\":\"jsoh\"})\n 2016-04-12 21:09:56 INFO logged_requests.logged_requests.request: POST https://httpbin.org/post\n 2016-04-12 21:09:57 DEBUG logged_requests.logged_requests.request: Request Headers: Content-Length: 16 | Accept-Encoding: gzip, deflate | Accept: */* | User-Agent: python-requests/2.9.1 | Connection: keep-alive | Content-Type: application/json |\n 2016-04-12 21:09:57 INFO logged_requests.logged_requests.request: Request Payload: '{\"name\": \"josh\"}'\n 2016-04-12 21:09:57 INFO logged_requests.logged_requests.request: Status code: 200\n 2016-04-12 21:09:57 DEBUG logged_requests.logged_requests.request: Response Headers: 'Content-Length: 411 | Server: nginx | Connection: keep-alive | Access-Control-Allow-Credentials: true | Date: Tue, 12 Apr 2016 19:09:57 GMT | Access-Control-Allow-Origin: * | Content-Type: application/json | '\n 2016-04-12 21:09:57 DEBUG logged_requests.logged_requests.request: Response Content: '{\\n \"args\": {}, \\n \"data\": \"{\\\\\"name\\\\\": \\\\\"josh\\\\\"}\", \\n \"files\": {}, \\n \"form\": {}, \\n \"headers\": {\\n \"Accept\": \"*/*\", \\n \"Accept-Encoding\": \"gzip, deflate\", \\n \"Content-Length\": \"16\", \\n \"Content-Type\": \"application/json\", \\n \"Host\": \"httpbin.org\", \\n \"User-Agent\": \"python-requests/2.9.1\"\\n }, \\n \"json\": {\\n \"name\": \"josh\"\\n }, \\n \"origin\": \"82.227.125.5\", \\n \"url\": \"https://httpbin.org/post\"\\n}\\n'\n\n*LoggedRequests* object can be initiated with a custom logger. If not initiated with a logger, *logged_request* will initiate a default logger, with **StreamHandler** as default *handler* and **DEBUG** as default *loggging level*\n\n.. code:: python\n\n >>> url = 'https://httpbin.org/post'\n >>> from logged_requests import LoggedRequests\n >>> req = LoggedRequests(my_custom_logger)\n\n.. |Build Status| image:: https://travis-ci.org/josuebrunel/logged-requests.svg?branch=master\n :target: https://travis-ci.org/josuebrunel/logged-requests\n.. |Documentation Status| image:: https://readthedocs.org/projects/logged-requests/badge/?version=latest\n :target: https://readthedocs.org/projects/logged-requests/?badge=latest", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/josuebrunel/logged-requests/archive/0.4.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/josuebrunel/logged-requests", "keywords": "requests,logging,log,logger,logged requests", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "logged_requests", "package_url": "https://pypi.org/project/logged_requests/", "platform": "Any", "project_url": "https://pypi.org/project/logged_requests/", "project_urls": { "Download": "https://github.com/josuebrunel/logged-requests/archive/0.4.tar.gz", "Homepage": "https://github.com/josuebrunel/logged-requests" }, "release_url": "https://pypi.org/project/logged_requests/0.4/", "requires_dist": null, "requires_python": null, "summary": "Simple wrapper around the requets library", "version": "0.4" }, "last_serial": 2224611, "releases": { "0.2": [], "0.3": [ { "comment_text": "", "digests": { "md5": "7ddb1910c27c26ae8a33bf23471df1e8", "sha256": "2e38d225d3e6cbb65fa0743bea61fc37f9160c58374927ce671bc26837aedc85" }, "downloads": -1, "filename": "logged_requests-0.3.tar.gz", "has_sig": false, "md5_digest": "7ddb1910c27c26ae8a33bf23471df1e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3491, "upload_time": "2016-07-15T15:49:18", "url": "https://files.pythonhosted.org/packages/86/85/3730dc05ec1d2f7e7cd0b12b38f1a2da0a1ed80169095d9f54462c836526/logged_requests-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "570473feca63d21fc81d34441aa0f5b5", "sha256": "9397f5fca3661a86d6670abb369ddea61056478233ea85a8c555a6a4581f3c35" }, "downloads": -1, "filename": "logged_requests-0.4.tar.gz", "has_sig": false, "md5_digest": "570473feca63d21fc81d34441aa0f5b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3406, "upload_time": "2016-07-15T16:42:55", "url": "https://files.pythonhosted.org/packages/0f/b9/dc782a157a44201489a4ceb3cd8c50c721e47d7161502762abc7955cf459/logged_requests-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "570473feca63d21fc81d34441aa0f5b5", "sha256": "9397f5fca3661a86d6670abb369ddea61056478233ea85a8c555a6a4581f3c35" }, "downloads": -1, "filename": "logged_requests-0.4.tar.gz", "has_sig": false, "md5_digest": "570473feca63d21fc81d34441aa0f5b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3406, "upload_time": "2016-07-15T16:42:55", "url": "https://files.pythonhosted.org/packages/0f/b9/dc782a157a44201489a4ceb3cd8c50c721e47d7161502762abc7955cf459/logged_requests-0.4.tar.gz" } ] }