{ "info": { "author": "Cedric DUMAY", "author_email": "cedric.dumay@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python" ], "description": ".. image:: https://img.shields.io/pypi/v/cdumay-http-client.svg\n :target: https://pypi.python.org/pypi/cdumay-http-client/\n :alt: Latest Version\n\n.. image:: https://travis-ci.org/cdumay/cdumay-http-client.svg?branch=master\n :target: https://travis-ci.org/cdumay/cdumay-http-client\n :alt: Latest version\n\n\n.. image:: https://readthedocs.org/projects/cdumay-http-client/badge/?version=latest\n :target: http://cdumay-http-client.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/badge/license-BSD3-blue.svg\n :target: https://github.com/cdumay/cdumay-http-client/blob/master/LICENSE\n\ncdumay-http-client\n==================\n\nThis library is a basic HTTP client for NON-REST api with exception formatting.\n\n\nQuickstart\n----------\n\nFirst, install cdumay-rest-client using\n`pip `_:\n\n $ pip install cdumay-http-client\n\nNext, add a `HttpClient` instance to your code:\n\n.. code-block:: python\n\n from cdumay_http_client.client import HttpClient\n\n client = HttpClient(server=\"http://warp.myhost.com/api/v0\")\n print(client.do_request(method=\"POST\", path=\"/exec\", data=[...]))\n\nException\n---------\n\nYou can use `marshmallow `_\nto serialize exceptions:\n\n.. code-block:: python\n\n import json, sys\n from cdumay_http_client.client import HttpClient\n from cdumay_http_client.exceptions import HTTPException, HTTPExceptionValidator\n\n try:\n client = HttpClient(server=\"http://warp.myhost.com/api/v0\")\n data = client.do_request(method=\"GET\", path=\"/me\")\n except HTTPException as exc:\n data = HTTPExceptionValidator().dump(exc).data\n\n json.dump(data, sys.stdout, sort_keys=True, indent=4, separators=(',', ': '))\n\nResult:\n\n.. code-block:: python\n\n {\n \"code\": 404,\n \"extra\": {},\n \"message\": \"Not Found\"\n }\n\nLicense\n-------\n\nLicensed under `BSD 3-Clause License <./LICENSE>`_ or https://opensource.org/licenses/BSD-3-Clause.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cdumay/cdumay-http-client", "keywords": "", "license": "BSD 3-Clause", "maintainer": "", "maintainer_email": "", "name": "cdumay-http-client", "package_url": "https://pypi.org/project/cdumay-http-client/", "platform": "", "project_url": "https://pypi.org/project/cdumay-http-client/", "project_urls": { "Homepage": "https://github.com/cdumay/cdumay-http-client" }, "release_url": "https://pypi.org/project/cdumay-http-client/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "HTTP client", "version": "0.0.4" }, "last_serial": 5951046, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "ee4a71d6e99bf06e0842dbbe8b33e546", "sha256": "773e2cbaed6438d7361c0086035a13d9d7fd2a006a4f96c52fac7e5d543957f4" }, "downloads": -1, "filename": "cdumay-http-client-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ee4a71d6e99bf06e0842dbbe8b33e546", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5640, "upload_time": "2019-09-26T14:29:21", "url": "https://files.pythonhosted.org/packages/c6/68/63e1155265d995c3e7a315570cebc3c71b87c8a1ee58ca6d0b8b3349c9bb/cdumay-http-client-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "7b0a159bbe65e8cdedb0303bd5b15b6d", "sha256": "447ee3388dd5fb4dad60629e2ce95992491866f6a5fe8a90546f1e529a2d2910" }, "downloads": -1, "filename": "cdumay-http-client-0.0.2.tar.gz", "has_sig": false, "md5_digest": "7b0a159bbe65e8cdedb0303bd5b15b6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5640, "upload_time": "2019-09-30T12:55:33", "url": "https://files.pythonhosted.org/packages/07/ac/9f3e7dd1ab70460bffc5d8c4494a97a6794133ab59be929722d34e72a313/cdumay-http-client-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "dae8d80f9f76b8921e51868742a2bf39", "sha256": "a644f021f45a8d0888631ac29b766bf4330950abb39385e0c3e588f34f6e1083" }, "downloads": -1, "filename": "cdumay-http-client-0.0.3.tar.gz", "has_sig": false, "md5_digest": "dae8d80f9f76b8921e51868742a2bf39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5658, "upload_time": "2019-10-09T11:18:28", "url": "https://files.pythonhosted.org/packages/a8/a4/fbd0329877cfd3ab31f4f9dcb32ebe33e6dcd5f27d43d051185b1a2567fc/cdumay-http-client-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "69b6c1f03551d1df627a30375735649b", "sha256": "97551592f546f001cfbe8e196cfd17340d03cd79dec24bc6a3bee91729693768" }, "downloads": -1, "filename": "cdumay-http-client-0.0.4.tar.gz", "has_sig": false, "md5_digest": "69b6c1f03551d1df627a30375735649b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5653, "upload_time": "2019-10-09T17:13:49", "url": "https://files.pythonhosted.org/packages/ab/8f/6e7c3a296b15d789be52536262683dc10569fea820179ca5c856cafc3aa9/cdumay-http-client-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "69b6c1f03551d1df627a30375735649b", "sha256": "97551592f546f001cfbe8e196cfd17340d03cd79dec24bc6a3bee91729693768" }, "downloads": -1, "filename": "cdumay-http-client-0.0.4.tar.gz", "has_sig": false, "md5_digest": "69b6c1f03551d1df627a30375735649b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5653, "upload_time": "2019-10-09T17:13:49", "url": "https://files.pythonhosted.org/packages/ab/8f/6e7c3a296b15d789be52536262683dc10569fea820179ca5c856cafc3aa9/cdumay-http-client-0.0.4.tar.gz" } ] }