{ "info": { "author": "Dave Shawley", "author_email": "daveshawley+harserver@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Environment :: No Input/Output (Daemon)", "Framework :: AsyncIO", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: POSIX", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development :: Testing :: Mocking" ], "description": "==========\nHAR Server\n==========\nSimple programmable HTTP API server.\n\n|build| |coverage| |docs|\n\nThe server is programmable using elements from the `HTTP Archive`_ (HAR)\nspecification originally developed by `Jan Odvarko`_ and the `W3C`_\nweb-performance working group. It was never moved beyond draft in the\nW3C. Jan Odvarko has maintained the specification on his blog. I created\nthis project after discovering the `mockbin`_ service created by `Mashape`_\n(now `KongHQ`_). Unfortunately `mockbin`_ does not meet my exact needs.\n\nUsage\n=====\nThe primary use case is to return programmed responses to specified\nrequests. The response is POSTed to service along with a matching request.\nBoth are specified as HAR objects -- the request is a `HAR request`_ and\nthe response is a `HAR response`_ ::\n\n POST /responses HTTP/1.1\n Host: 127.0.0.1:8080\n Content-Type: application/json\n Content-Length: 733\n\n {\n \"request\": {\n \"method\": \"GET\",\n \"url\": \"http://example.org/status\",\n \"httpVersion\": \"HTTP/1.1\",\n \"cookies\": [],\n \"headers\": [],\n \"queryString\": [],\n \"postData\": {},\n \"headersSize\": -1,\n \"bodySize\": 0\n },\n \"response\": {\n \"status\": 200,\n \"statusText\": \"OK\",\n \"httpVersion\": \"HTTP/1.1\",\n \"cookies\": [],\n \"headers\": [\n {\"name\":\"Content-Type\", \"value\":\"application/json\"}\n ],\n \"content\": {\n \"mimeType\": \"application/json\",\n \"encoding\": \"json\",\n \"text\": {\n \"service\": \"my-service\",\n \"status\": \"ok\"\n }\n },\n \"redirectURL\": \"\",\n \"headersSize\": -1,\n \"bodySize\": -1\n }\n }\n\n HTTP/1.1 200 OK\n Content-Type: application/json\n Content-Length: 49\n Link: ; rel=host-map; method=GET\n Link: ; rel=requests; method=GET\n Link: ; rel=add-response; method=POST\n Link: ; rel=clear-responses;\n method=PURGE\n\n {\n \"effective_url\": \"http://127.0.0.1:32443\"\n }\n\nAfter this message is sent, the service will respond to ``GET /status``\non port 32443 with the registered response::\n\n GET /status HTTP/1.1\n Host: 127.0.0.1:32443\n\n HTTP/1.1 200 OK\n Content-Type: application/json\n\n {\n \"service\": \"my-service\",\n \"status\": \"ok\"\n }\n\n.. _HAR request: http://www.softwareishard.com/blog/har-12-spec/#request\n.. _HAR response: http://www.softwareishard.com/blog/har-12-spec/#response\n.. _HTTP Archive: http://www.softwareishard.com/blog/har-12-spec/\n.. _Jan Odvarko: http://www.softwareishard.com/blog/about/\n.. _KongHQ: https://konghq.com/\n.. _Mashape: https://en.wikipedia.org/wiki/Mashape\n.. _mockbin: https://mockbin.com/\n.. _W3C: https://w3c.github.io/web-performance/specs/HAR/Overview.html\n\n.. |build| image:: https://circleci.com/gh/dave-shawley/har-server/tree/master.svg?style=svg\n :target: https://circleci.com/gh/dave-shawley/har-server/tree/master\n.. |coverage| image:: https://coveralls.io/repos/github/dave-shawley/har-server/badge.svg?branch=master\n :target: https://coveralls.io/github/dave-shawley/har-server?branch=master\n.. |docs| image:: https://readthedocs.org/projects/har-server/badge/?version=latest\n :target: https://har-server.readthedocs.io/en/latest/?badge=latest\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/dave-shawley/har-server", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "har-server", "package_url": "https://pypi.org/project/har-server/", "platform": "", "project_url": "https://pypi.org/project/har-server/", "project_urls": { "Builds": "https://circleci.com/gh/dave-shawley/har-server/", "Coverage Reports": "https://coveralls.io/github/dave-shawley/har-server", "Documentation": "http://har-server.readthedocs.io/", "Homepage": "https://github.com/dave-shawley/har-server", "Source Code": "https://github.com/dave-shawley/har-server/" }, "release_url": "https://pypi.org/project/har-server/0.0.1/", "requires_dist": [ "aiohttp (==3.4.4)", "yarl (==1.3.0)", "coverage (==4.5.2) ; extra == 'dev'", "coveralls (==1.5.1) ; extra == 'dev'", "flake8 (==3.6.0) ; extra == 'dev'", "nose (==1.3.7) ; extra == 'dev'", "pycodestyle (==2.4.0) ; extra == 'dev'", "pyflakes (==2.0.0) ; extra == 'dev'", "Sphinx (==1.8.2) ; extra == 'dev'", "twine (==1.12.1) ; extra == 'dev'", "wheel (==0.32.3) ; extra == 'dev'", "yapf (==0.25.0) ; extra == 'dev'", "Sphinx (==1.8.2) ; extra == 'docs'" ], "requires_python": "", "summary": "Programmable HTTP server for testing", "version": "0.0.1" }, "last_serial": 4630003, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "02249d2f7614baa7e15df214085dc04f", "sha256": "92aa55b9d9c962d5c72a5ba4079997a11fde4114df1ff3ce4e12fe2dfd816416" }, "downloads": -1, "filename": "har_server-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "02249d2f7614baa7e15df214085dc04f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3950, "upload_time": "2018-12-23T19:37:01", "url": "https://files.pythonhosted.org/packages/5e/3a/a40616a2ad208035709f1fb392dad65d45b0981925ca24373687d5f15c8f/har_server-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df8d6da9c6c6bdcdffac4a62b292ac62", "sha256": "a5924d7394db5df53eb12092285e3de7d2f97e746c520cb70ecdcdb7f89dc37e" }, "downloads": -1, "filename": "har-server-0.0.1.tar.gz", "has_sig": false, "md5_digest": "df8d6da9c6c6bdcdffac4a62b292ac62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4711, "upload_time": "2018-12-23T19:37:03", "url": "https://files.pythonhosted.org/packages/ec/65/d2d8a4fb8a4933eb2bf744324be2842e14afad46f8fe5687f3c4a7781a52/har-server-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "02249d2f7614baa7e15df214085dc04f", "sha256": "92aa55b9d9c962d5c72a5ba4079997a11fde4114df1ff3ce4e12fe2dfd816416" }, "downloads": -1, "filename": "har_server-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "02249d2f7614baa7e15df214085dc04f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3950, "upload_time": "2018-12-23T19:37:01", "url": "https://files.pythonhosted.org/packages/5e/3a/a40616a2ad208035709f1fb392dad65d45b0981925ca24373687d5f15c8f/har_server-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df8d6da9c6c6bdcdffac4a62b292ac62", "sha256": "a5924d7394db5df53eb12092285e3de7d2f97e746c520cb70ecdcdb7f89dc37e" }, "downloads": -1, "filename": "har-server-0.0.1.tar.gz", "has_sig": false, "md5_digest": "df8d6da9c6c6bdcdffac4a62b292ac62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4711, "upload_time": "2018-12-23T19:37:03", "url": "https://files.pythonhosted.org/packages/ec/65/d2d8a4fb8a4933eb2bf744324be2842e14afad46f8fe5687f3c4a7781a52/har-server-0.0.1.tar.gz" } ] }