{ "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.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "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\n================\n.. image:: https://travis-ci.org/peterhudec/liveandletdie.svg?branch=master\n :target: https://travis-ci.org/peterhudec/liveandletdie\n\n**Live and Let Die** simplifies launching and terminating of web development\nservers from **BDD** or **functional** tests. I have created it for functional\ntesting of the `Authomatic `_ package.\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\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\nFlask\n^^^^^\n\nBy **Flask** you must wrap the **WSGI application** in\n``liveandletdie.Flask.wrap(app)``.\n\nIf you set the ``ssl`` keyword argument to ``True``, the app will be run with\n``ssl_context=\"adhoc\"`` and the schema of the ``self.check_url``\nwill be ``\"https\"``.\n\n.. warning::\n\n The Flask with ssl_context **doesn't work in Python 3** because\n Werkzeug still uses ``sys.maxint`` which is not supported in Python 3\n (see https://github.com/mitsuhiko/werkzeug/issues/)\n\n.. note::\n\n If you are struggling with installation of\n `pyOpenSSL `__ on OSX due to\n ``'ffi.h' file not found`` error during installation of the\n `cryptography `__\n dependency, try the solution from this\n `Stackoverflow question `__:\n\n .. code-block:: bash\n\n $ brew install pkg-config libffi\n $ export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig/\n $ pip install pyopenssl\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\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\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_port is True,\n # it will kill any process listening on port 5555\n process = app.live(kill_port=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\nDebugging\n---------\n\nIf an app refuses to start on the ``app.live()`` call, it throws a\n``LiveAndLetDieError`` with a message::\n\n Flask server https://127.0.0.1:5555 didn't start in specified timeout 10.0 seconds!\n command: python sample_apps/flask/main.py --liveandletdie 127.0.0.1:5555\n\nTo find out more about why the app didn't start run the command provided in the\nerror message manually:\n\n.. code-block:: bash\n\n $ python sample_apps/flask/main.py --liveandletdie 127.0.0.1:5555\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\nOr bootstrap and run tests in one step:\n\n::\n\n $ sh bootstrap-and-test.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/liveandletdie", "keywords": "Flask,Pyramid,Django,Google App Engine,GAE,BDD,TDD,functional testing,live server", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "liveandletdie", "package_url": "https://pypi.org/project/liveandletdie/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/liveandletdie/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/peterhudec/liveandletdie" }, "release_url": "https://pypi.org/project/liveandletdie/0.0.6/", "requires_dist": null, "requires_python": null, "summary": "Simplifies launching and terminating of web development servers from BDD and functional tests.", "version": "0.0.6" }, "last_serial": 4992476, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "ea8bab2ba72f16d439b34b3a7def154c", "sha256": "3e9329b8b35fc80caa5eb7ddfe09263f96d5a379af8999f6688fda71e200f6c2" }, "downloads": -1, "filename": "liveandletdie-0.0.0.tar.gz", "has_sig": false, "md5_digest": "ea8bab2ba72f16d439b34b3a7def154c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6761, "upload_time": "2014-01-08T14:40:57", "url": "https://files.pythonhosted.org/packages/e1/5f/d6d1434af2651605a10649eec92e76face88261d0fc289700fec8346bbe1/liveandletdie-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "d3c0fbdbba8cb166c2ef8a143d8923d0", "sha256": "0f6924252b94cc91916a302073e0317bbad0823b78f3b654accc911dc5f984ef" }, "downloads": -1, "filename": "liveandletdie-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d3c0fbdbba8cb166c2ef8a143d8923d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6948, "upload_time": "2014-01-10T20:29:06", "url": "https://files.pythonhosted.org/packages/39/3c/6944ea6aa29bb81b52e6396d82524cd38a0b16683af389f6a8dcc6c285d7/liveandletdie-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "5cd25a3599ffb44350e2ecb559c731ab", "sha256": "157a58f7d64d66e313c6be93da8c8c2993fefbfbc61b8f5edc8e84f29d7d706a" }, "downloads": -1, "filename": "liveandletdie-0.0.2.tar.gz", "has_sig": false, "md5_digest": "5cd25a3599ffb44350e2ecb559c731ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6850, "upload_time": "2014-04-15T12:45:25", "url": "https://files.pythonhosted.org/packages/17/b8/d2325a708f7453ca3d8e86c6919a9b86bc5057d3d5794c0bf8456ff5e60a/liveandletdie-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "c2eb8e2fb4814afc5fc33297ee5b8b9c", "sha256": "0692bf2c11d494f137c35d99828b260a86ea820dc3180b47e7f7e4f07fe0f118" }, "downloads": -1, "filename": "liveandletdie-0.0.3.tar.gz", "has_sig": false, "md5_digest": "c2eb8e2fb4814afc5fc33297ee5b8b9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8512, "upload_time": "2014-12-02T21:59:30", "url": "https://files.pythonhosted.org/packages/11/bf/0f61354657331f669b954a0ca9364577ca91cb2a2ac82697116f3aaefc29/liveandletdie-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "890805f9b83bb04e7f58b8c6322e7084", "sha256": "6e48cabf84b1b9aa435e8b6594427901ee2da9ac981012eccdb517352303b5f4" }, "downloads": -1, "filename": "liveandletdie-0.0.4.tar.gz", "has_sig": false, "md5_digest": "890805f9b83bb04e7f58b8c6322e7084", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8010, "upload_time": "2014-12-17T22:18:36", "url": "https://files.pythonhosted.org/packages/9e/c2/3b22ed86bcf80628ec9ebaf71c00f4dcb097cda10c29a5a298c073ed30a9/liveandletdie-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "02a7bce935f933a06f2f73b10e316777", "sha256": "bf3d7125eba3cf824b3a88c14c6cbf69cc0e669360fcfbe6e30d3b956f90d32f" }, "downloads": -1, "filename": "liveandletdie-0.0.5.tar.gz", "has_sig": false, "md5_digest": "02a7bce935f933a06f2f73b10e316777", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8838, "upload_time": "2015-02-07T20:53:53", "url": "https://files.pythonhosted.org/packages/95/fd/bb083c3dce1809ff2e2334f17dd8f650393a593d6e5e62d442ead8cd1674/liveandletdie-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "aa59e5ebb319c8301065d6274b471146", "sha256": "109eb39a1c179d4a23bef17cfa3c4aebb501044fb560e2796c3c6b4e49ca5ab6" }, "downloads": -1, "filename": "liveandletdie-0.0.6.tar.gz", "has_sig": false, "md5_digest": "aa59e5ebb319c8301065d6274b471146", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9118, "upload_time": "2015-06-16T17:58:15", "url": "https://files.pythonhosted.org/packages/0e/3a/254a95bac566b97c4ff1bcecb99a8b46018a91128740d4db5b556112b9ec/liveandletdie-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aa59e5ebb319c8301065d6274b471146", "sha256": "109eb39a1c179d4a23bef17cfa3c4aebb501044fb560e2796c3c6b4e49ca5ab6" }, "downloads": -1, "filename": "liveandletdie-0.0.6.tar.gz", "has_sig": false, "md5_digest": "aa59e5ebb319c8301065d6274b471146", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9118, "upload_time": "2015-06-16T17:58:15", "url": "https://files.pythonhosted.org/packages/0e/3a/254a95bac566b97c4ff1bcecb99a8b46018a91128740d4db5b556112b9ec/liveandletdie-0.0.6.tar.gz" } ] }