{ "info": { "author": "Peter Hudec", "author_email": "peterhudec@peterhudec.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "==========================================\nLive and Let Die (former Test Live Server)\n==========================================\n\n**Test Live Server** moved to **Live and Let Die**!\n\nhttps://pypi.python.org/pypi/liveandletdie\nhttps://github.com/peterhudec/liveandletdie\n\n\n**Live and Let Die** is a simple package to simplify launching and\nterminating of web development servers from **BDD** or **functional** tests.\nI have created it for functional testing of the\n`Authomatic `_ package.\n\nNote that the package has just recently been renamed from former **testliveserver**\nto current **liveandletdie**!\n\nThe package Currently supports **Google App engine**, **Django**,\n**Flask** and **wsgiref.simple_server**. Support for other frameworks will\nhopefully be added in future.\n\nUsage\n-----\n\nYou first need to make instance of one of the framework classes.\n\nDjango\n^^^^^^\n\n.. code-block:: python\n\n import liveandletdie\n\n # Django\n app = liveandletdie.Django('path/to/django/project/',\n host='0.0.0.0',\n port=5555,\n timeout=60.0)\n\nGoogle App Engine\n^^^^^^^^^^^^^^^^^\n\n.. code-block:: python\n\n import liveandletdie\n\n app = liveandletdie.GAE('path/to/dev_appserver.py',\n 'path/to/gae/app/dir', # containing app.yaml file\n host='0.0.0.0',\n port=5555,\n timeout=60.0)\n\nFlask\n^^^^^\n\nBy **Flask** you must wrap the **WSGI application** in\n``liveandletdie.Flask.wrap(app)``.\n\n.. code-block:: python\n\n # flask/app/main.py\n from flask import Flask\n\n DEBUG = True\n SECRET_KEY = 'development key'\n USERNAME = 'admin'\n PASSWORD = 'default'\n\n app = Flask(__name__)\n app.config.from_object(__name__)\n\n @app.route('/')\n def home():\n return 'Hello World!'\n\n if __name__ == '__main__':\n\n # This does nothing unless you run this module with --liveandletdie flag.\n import liveandletdie\n liveandletdie.Flask.wrap(app)\n\n app.run()\n\n\n.. code-block:: python\n\n import liveandletdie\n\n app = liveandletdie.Flask('path/to/flask/app/main.py',\n host='0.0.0.0',\n port=5555,\n timeout=60.0)\n\nPyramid (wsgiref.simple_server)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nBy ``wsgiref.simple_server`` you must wrap the **WSGI application** in\n``liveandletdie.WsgirefSimpleServer.wrap(app)``.\n\n.. code-block:: python\n\n # pyramid/app/main.py\n from wsgiref.simple_server import make_server\n\n from pyramid.config import Configurator\n from pyramid.response import Response\n\n\n def home(request):\n return Response('Hello World!')\n\n\n if __name__ == '__main__':\n\n config = Configurator()\n config.add_route('home', '/')\n config.add_view(home, route_name='home')\n app = config.make_wsgi_app()\n\n # This does nothing unless you run this module with --liveandletdie flag.\n import liveandletdie\n liveandletdie.WsgirefSimpleServer.wrap(app)\n\n server = make_server('127.0.0.1', 8080, app)\n server.serve_forever()\n\n\n.. code-block:: python\n\n import liveandletdie\n\n app = liveandletdie.Flask('path/to/pyramid/app/main.py',\n host='0.0.0.0',\n port=5555,\n timeout=60.0)\n\nUsing the App instance\n^^^^^^^^^^^^^^^^^^^^^^\n\nThe interface is the same for all of the supported frameworks.\n\n.. code-block:: python\n\n # Start the app.\n # If kill is True, it will kill any Python process listening on port 5555\n process = app.live(kill=True)\n\n # You can check whether it is running\n is_running = app.check()\n\n # Stop it\n app.die()\n\nSimple UnitTest example:\nhttps://github.com/peterhudec/liveandletdie/blob/master/test_examples/unittest_example/tests.py\n\nSimple PyTest example:\nhttps://github.com/peterhudec/liveandletdie/blob/master/test_examples/pytest_example/tests.py\n\nSimple Lettuce example:\nhttps://github.com/peterhudec/liveandletdie/blob/master/test_examples/lettuce_example/tests.py\n\nDevelopers\n----------\n\nClone:\n\n::\n \n $ git clone https://github.com/peterhudec/liveandletdie.git\n\nBootstrap the development environment.\nThis will create the ``./venv`` virtual environment in the project root.\n\n::\n \n $ sh bootstrap.sh\n\nRun tests:\n\n::\n \n $ sh run-all.sh\n\nEnjoy!", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/peterhudec/testliveserver", "keywords": "Flask,BDD,TDD,functional testing,live server", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "TestLiveServer", "package_url": "https://pypi.org/project/TestLiveServer/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/TestLiveServer/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/peterhudec/testliveserver" }, "release_url": "https://pypi.org/project/TestLiveServer/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "Simplifies launching and terminating of web development\nservers from **BDD** or **functional** tests", "version": "0.0.2" }, "last_serial": 4992481, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "dc4e0bf8bc82ec2f23ca7ca7856f2238", "sha256": "7515e0841613d26b498429e104388e6f85b0f762069128934a7d35b660c82a96" }, "downloads": -1, "filename": "TestLiveServer-0.0.0.tar.gz", "has_sig": false, "md5_digest": "dc4e0bf8bc82ec2f23ca7ca7856f2238", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3470, "upload_time": "2013-07-31T17:06:11", "url": "https://files.pythonhosted.org/packages/2b/db/9d56ff9a9f44da455020c92993a4e5cf75c0f94f7a7f94807a6416fa59cf/TestLiveServer-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "f39006f2678ef316467d7af0b79bdc7d", "sha256": "aca5256129629f5b830a1a9b26a1ae287138f83798d361e24e7662ed5843f35c" }, "downloads": -1, "filename": "TestLiveServer-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f39006f2678ef316467d7af0b79bdc7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4630, "upload_time": "2013-08-23T16:05:47", "url": "https://files.pythonhosted.org/packages/c3/17/1926b5827c0b6d3cb0adf0d12cb48516c29e77a44f2aed4fae6dcbad1834/TestLiveServer-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "dfdd9c4109df3000f5dab751fe7ed915", "sha256": "4dcabb9b19f333edf6ac7dd21c2a4a6f46af8c790d2d9d9b4710c3520e38d6ff" }, "downloads": -1, "filename": "TestLiveServer-0.0.2.tar.gz", "has_sig": false, "md5_digest": "dfdd9c4109df3000f5dab751fe7ed915", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6836, "upload_time": "2014-01-08T14:35:10", "url": "https://files.pythonhosted.org/packages/59/46/7eb0d472cb01fb10cc1b0c3e9c9b0e7d2ea20819e89417a08996f73435a3/TestLiveServer-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dfdd9c4109df3000f5dab751fe7ed915", "sha256": "4dcabb9b19f333edf6ac7dd21c2a4a6f46af8c790d2d9d9b4710c3520e38d6ff" }, "downloads": -1, "filename": "TestLiveServer-0.0.2.tar.gz", "has_sig": false, "md5_digest": "dfdd9c4109df3000f5dab751fe7ed915", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6836, "upload_time": "2014-01-08T14:35:10", "url": "https://files.pythonhosted.org/packages/59/46/7eb0d472cb01fb10cc1b0c3e9c9b0e7d2ea20819e89417a08996f73435a3/TestLiveServer-0.0.2.tar.gz" } ] }