{ "info": { "author": "Vasiliy Faronov", "author_email": "vfaronov@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: ISC License (ISCL)", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development :: Testing", "Topic :: Utilities" ], "description": "Turq\n====\n\nTurq is a small HTTP server that can be scripted in a Python-based language.\nUse it to set up **mock HTTP resources** that respond with the status, headers,\nand body of your choosing. Turq is designed for quick interactive testing,\nbut can be used in automated scenarios as well.\n\n\nLets you do things like\n-----------------------\n\n\"RESTful API\" resource with cross-origin support::\n\n if route('/v1/products/:product_id'):\n if GET or HEAD:\n json({'id': product_id, 'inStock': True})\n elif PUT:\n json(request.json) # As if we saved it\n elif DELETE:\n status(204)\n cors() # Handles preflight requests automatically\n\nRedirect to an ``index.php``, which serves a gzipped, cacheable page\nafter 3 seconds of \"loading\"::\n\n if path == '/':\n redirect('/index.php')\n\n if path == '/index.php':\n sleep(3)\n html()\n gzip()\n header('Cache-Control', 'max-age=3600')\n\nStream `server-sent events`_::\n\n header('Content-Type', 'text/event-stream')\n for i in range(9000):\n sleep(1)\n chunk('data: event number %d\\r\\n\\r\\n' % i)\n\n.. _server-sent events: https://en.wikipedia.org/wiki/Server-sent_events\n\n\nBuilt-in editor\n---------------\n\nYou don't even need to create any files, just use the built-in Web editor:\n\n.. image:: screenshot.png\n\n\nGet it now\n----------\n\nIn any Python 3.4+ environment::\n\n $ pip3 install turq\n $ turq\n\n`Read the docs `_ for more.\n\n\nThanks\n------\n\n`BrowserStack`_ have kindly provided a free subscription for testing Turq.\n\n.. _BrowserStack: https://www.browserstack.com/", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/vfaronov/turq", "keywords": "HTTP Web server mock mocking test debug", "license": "ISC", "maintainer": "", "maintainer_email": "", "name": "turq", "package_url": "https://pypi.org/project/turq/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/turq/", "project_urls": { "Homepage": "https://github.com/vfaronov/turq" }, "release_url": "https://pypi.org/project/turq/0.3.1/", "requires_dist": [ "Werkzeug (>=0.12.1)", "colorlog (>=2.10.0)", "docutils (>=0.13.1)", "dominate (>=2.3.1)", "falcon (>=1.1.0)", "h11 (>=0.7.0)", "colorama (>=0.3.7); sys_platform == \"win32\"" ], "requires_python": "", "summary": "Mock HTTP server", "version": "0.3.1" }, "last_serial": 2752689, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "bde9296f04015d5ee42af46c7cb697dc", "sha256": "ffa39e7f5965632bcd527a297bd1fccd929061a99219a0c26f1eeac32c27e4f0" }, "downloads": -1, "filename": "turq-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bde9296f04015d5ee42af46c7cb697dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9650, "upload_time": "2012-11-17T17:39:01", "url": "https://files.pythonhosted.org/packages/5e/99/f546d67902fd1b90e88aeef8c8ef767f570967bc60d9b36619efe9a144e3/turq-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "c739aea2604898f4dff135e8bc201f83", "sha256": "645c967303d18ff54c628b23656c0df87b35e0fed8a4492c1b341eaba09118e7" }, "downloads": -1, "filename": "turq-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c739aea2604898f4dff135e8bc201f83", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11854, "upload_time": "2012-12-08T21:44:00", "url": "https://files.pythonhosted.org/packages/1c/ae/1533cf9a7610d05438b9fd483c04a55f060af9845a43f26e5acaae39ec92/turq-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "7ae38507bc9cf58f80f98b675ed410e1", "sha256": "19c4a73d81dad4a69ce96aa8806ab8a09c3a6074cf1439051b21c41bfcf9e753" }, "downloads": -1, "filename": "turq-0.3.0.tar.gz", "has_sig": false, "md5_digest": "7ae38507bc9cf58f80f98b675ed410e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 213287, "upload_time": "2017-04-04T17:34:06", "url": "https://files.pythonhosted.org/packages/40/99/8ac21d0f12d17059cdab4b20b7d7b4492b1543ced537b23acefd0ab99ada/turq-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "d63f785e6774cd57b137fe60f765ef26", "sha256": "f83f1ee7c61bb5d74b6feb2c417aca3a0bb15954a9409c733432ce0d858ec95a" }, "downloads": -1, "filename": "turq-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d63f785e6774cd57b137fe60f765ef26", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 133259, "upload_time": "2017-04-04T17:47:06", "url": "https://files.pythonhosted.org/packages/a0/3b/26e887df04d75bef9c6f6ad12c25e77a753e1bfd946e9628d3a542db40ff/turq-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cfb3e8132bdb763426d91922b2a2dd9c", "sha256": "4db8747eedaa4928618dd18376a80550f37a2a3823495934eef234e84c17fcfe" }, "downloads": -1, "filename": "turq-0.3.1.tar.gz", "has_sig": false, "md5_digest": "cfb3e8132bdb763426d91922b2a2dd9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 213322, "upload_time": "2017-04-04T17:47:08", "url": "https://files.pythonhosted.org/packages/f0/75/2a942041a5e098a1580089b78fb90ebbbf79d4d883a25139ca2c3941574b/turq-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d63f785e6774cd57b137fe60f765ef26", "sha256": "f83f1ee7c61bb5d74b6feb2c417aca3a0bb15954a9409c733432ce0d858ec95a" }, "downloads": -1, "filename": "turq-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d63f785e6774cd57b137fe60f765ef26", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 133259, "upload_time": "2017-04-04T17:47:06", "url": "https://files.pythonhosted.org/packages/a0/3b/26e887df04d75bef9c6f6ad12c25e77a753e1bfd946e9628d3a542db40ff/turq-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cfb3e8132bdb763426d91922b2a2dd9c", "sha256": "4db8747eedaa4928618dd18376a80550f37a2a3823495934eef234e84c17fcfe" }, "downloads": -1, "filename": "turq-0.3.1.tar.gz", "has_sig": false, "md5_digest": "cfb3e8132bdb763426d91922b2a2dd9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 213322, "upload_time": "2017-04-04T17:47:08", "url": "https://files.pythonhosted.org/packages/f0/75/2a942041a5e098a1580089b78fb90ebbbf79d4d883a25139ca2c3941574b/turq-0.3.1.tar.gz" } ] }