{ "info": { "author": "Chris Lee-Messer", "author_email": "chris@lee-messer.net, pete@lincolnloop.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Framework :: Django", "License :: OSI Approved :: BSD License", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Internet :: WWW/HTTP :: WSGI :: Server" ], "description": "=================\ndjango-wsgiserver\n=================\n\nSummary\n-------\n\ndjango-wsgiserver is a django app for serving Django sites via\nCherryPy's excellent, production ready, pure-python web server without needing to\ninstall all of Cherrypy_. Note that Cherrypy names its server \"wsgiserver\" but\nit is actually a full-blown, multi-threaded http/https web server which has been\nused on production sites alone, or more often proxied behind a something like\nApache or nginx.\n\nUses\n----\nThe wsgiserver component has been used for years in production. Peter\nBaumgartner noted that it solved problems for him on memory on a memory-limited\nVPS hosted site [#]_. Performance-wise it does well: it can serve up thousands\nof requests per second [Piel2010].\n\nI have used django-wsgiserver for small production sites, though daemonized\nmodwsgi_ and uwsgi_ have served me well. I use it all the time though during\ndevelopment. It's my \"pocket-sized\" server. completely written in python and it\ngives me an instant approximation of the final production environment I use. In\nsome ways, it's much better than the development server which is built into\ndjango: It gives a quick way of running an SSL for sites that require https, and\nit has no problem serving pages that do multiple ajax calls that would cause the\nbuilt-in runserver to hang.\n\nTo use django-wsgiserver, I add it to my installed apps in my project settings\nfile, then do::\n\n $ manage.py runwsgiserver\n\nand reload my browser page and the problem is fixed. It's also useful to see if\nsome weird effect is being caused by runserver's process of loading the settings\ntwice.\n\nThis project is a slight modification of code form Peter Baumgartner code (see `Peter's\nblog post`_) Peter and others did the work of creating a management command.\nI've added a few small improvements from my point of view: It doesn't require\ninstalling cherrypy separately. It uses the same port as the development server\n(8000) so I don't need to re-enter my testing url in my browser, and it works by\ndefault with OS's like Mac OS 10.6 and Ubuntu 10.04 which prefer binding\nlocalhost to an ip6 address.\n\nFeature list\n------------\n- multi-threaded production ready webserver for low to medium traffic sites\n- pure python\n- setuptools/pip installable (so install right in virtualenv)\n- small memory footprint\n- by default replaces mimics the django built-in server, serves admin media by\n default for easy testing and deployment\n- supports https/ssl \n\nPlanned features\n----------------\n- serve static media automatically (see django 1.3 static files support)\n- improve autoreload of changed files during development\n\nRequirements\n------------\nTo get started using the server, you need nothing outside of django itself and\nthe project code that you would like to serve up. However, for ssl support, you\nmay need PyOpenSSL--though the new cherrypy server includes support for using the\npython built-in ssl module depending on which version of python you are using.\n\nLicense\n-------\ndjango-wsgiserver is BSD licensed based on lincolnloop's django-cpservers original code.\n\n\nInstallation\n------------\nTo install, django-wsgiserver follows the usual pattern for a django python application. You have several options\n\n1. pip install django-wsgiserver OR\n2. easy_install django-wsgiserver\n3. If you would like to use the latest possible version, you can use pip and mercurial checkout from bitbucket\n\n::\n\n pip install -e hg+https://bitbucket.org/cleemesser/django-wsgiserver#egg=django-wsgiserver\n\n4. Alternatively you can download the code and install it so that django_wsgiserver is on your PYTHONPATH\n\nAfter you used one of the methods above, you need to add django_wsgiserver to your INSTALLED_APPS in your django project's settings file\n\nUsage\n-----\nTo see how to run the server as a management command, run::\n\n $ python manage.py runwsgiserver help \n \nfrom within your project directory. You'll see something like what's below::\n\n Run this project in CherryPy's production quality http webserver.\n Note that it's called wsgiserver but it is actually a complete http server.\n\n runwsgiserver [options] [wsgi settings] [stop]\n\n Optional CherryPy server settings: (setting=value)\n host=HOSTNAME hostname to listen on\n\t\t\t Defaults to 127.0.0.1,\n\t\t\t (set to 0.0.0.0 to bind all ip4 interfaces or :: for\n\t\t\t all ip6 interfaces)\n port=PORTNUM port to listen on\n\t\t\t Defaults to 8000\n server_name=STRING CherryPy's SERVER_NAME environ entry\n\t\t\t Defaults to localhost\n daemonize=BOOL whether to detach from terminal\n\t\t\t Defaults to False\n pidfile=FILE write the spawned process-id to this file\n workdir=DIRECTORY change to this directory when daemonizing\n threads=NUMBER Number of threads for server to use\n ssl_certificate=FILE SSL certificate file\n ssl_private_key=FILE SSL private key file\n server_user=STRING user to run daemonized process\n\t\t\t Defaults to www-data\n server_group=STRING group to daemonized process\n\t\t\t Defaults to www-data\n adminserve=True|False Serve the django admin media automatically. Useful\n in development. Defaults to True so turn to False\n if using in production.\n\n Examples:\n Run a \"standard\" CherryPy server server\n\t$ manage.py runwsgiserver\n\n Run a CherryPy server on port 80\n $ manage.py runwsgiserver port=80\n\n Run a CherryPy server as a daemon and write the spawned PID in a file\n $ manage.py runwsgiserver daemonize=true pidfile=/var/run/django-cpwsgi.pid\n\n Run a CherryPy server using ssl with test certificates located in /tmp\n $ manage.py runwsgiserver ssl_certificate=/tmp/testserver.crt ssl_private_key=/tmp/testserver.key\n\n\nNotes\n-----\n\nIf you want to use an installed version of Cherrypy--perhaps because you now have\na more recent version, you only need to change one line of code in (around line\n177) of django_wsgiserver/management/commands/run_wsgiserver.py::\n\n from django_wsgiserver.wsgiserver import CherryPyWSGIServer as Server\n #from cherrypy.wsgiserver import CherryPyWSGIServer as Server\n\nJust comment out the import from django_wsgiserver.wsgiserver and uncomment the import from cherrypy.wsgiserver to make the switch. For SSL use, you need to search and replace \"django_wsigserver.\" back to \"cherrypy.\"\n\nTo do\n-----\n- looking at settings for serving static media automatically\n- I should probably just add a switch to allow use of the native cherrypy install\n- Upload to the cheeseshop/pypi at some point. Done!\n- Consider other server backends: tornado, uwsgi\n\nChangelog\n---------\n- 0.6.10 add import of django.contrib.admin to address issue #5, #6\n- 0.6.9 typo fix\n- 0.6.8 Changed name of bitbucket repo to django-wsgiserver to match it's pypi name\n- 0.6.7 using open().read() in setup file broke setuptools/pip install because README.rst wasn't included. Created MANIFEST.in file and now include README.rst tests/, docs/ \n- 0.6.6 fix up cherrypy dependency in ssl that was accidently introduced in the\n move to cherrypy.wsgiserver 3.2 branch\n- 0.6.5 added mediahandler wsgi application\n- 9/6/10 0.6.4 added code to automatically serve the admin media like the\n development server does by default. Can turn off on command line for\n production.\n\n- 9/6/10 0.6.3 - see if I can get the download to finally include all the\n packages--didn't have wsgiserver!\n\n- added test project in tests/ directory\n\n- got tired of typing run_cp_wsgiserver so did a rename so I could use\n runwsgiserver instead.\n\n- updated wsgiserver to svn r2680 (matches cherrypy version 3.2 beta+). This\n fixes some bugs and gives better python 2.6 support. This version of cherrypy\n will also support python 3.x for whenever django starts supporting it.\n\n- use port 8000 as with django devserver rather than Cherrypy's default 8088\n\n- adapted defaults host=127.0.0.1 in order to work with ip4 by default. This\n addresses an issue I first noticed on mac OS 10.6 and later on ubuntu 10.04\n where ip6 is active by default. Can get around this by adjusting the host\n option. For binding all ip4 interfaces, set to 0.0.0.0. For all ip6 interfaces\n I believe you use '::' You can also bind a specific interface by specifying\n host= See http://www.cherrypy.org/ticket/711\n \n- switched code to use run_cp_wsgiserver instead of runcpserver\n\n\n\n\n\nAcknowledgments and References\n------------------------------\nMany thanks to Peter and lincolnloop for describing how to do this and writing the code.\n\nPeter acknowledged idea and code snippets borrowed from Loic d'Anterroches, adapted to run as a management command\n\nNote, there is also similar code on PyPi and at http://hg.piranha.org.ua/cpserver/ maintained by Alexander Solovyov\n\nThe latest version of the cherrypy wsgiserver can be retrieved with::\n\n svn co http://svn.cherrypy.org/trunk/cherrypy/wsgiserver\n\nPeter hosts his code at http://github.com/lincolnloop/django-cpserver \n\n.. [#] For example `Peter's blog post`_ describes using django_cpserver on a VPS.\n\n.. _`Peter's blog post`: http://lincolnloop.com/blog/2008/mar/25/serving-django-cherrypy/\n\n.. _Cherrypy: http://www.cherrypy.org/\n\n.. _[Piel2010] : http://nichol.as/benchmark-of-python-web-servers Nicholas Piel provides a nice comparison of different wsgi servers. Cherrypy's wsgiserver does quite respectably, demonstrating > 2000 requests/sec even at high load for http 1.0 connections with good response latencies. It does reasonably with http 1.1 connections as well.\n\n.. _modwsgi : http://code.google.com/p/modwsgi/\n\n.. _uwsgi : http://projects.unbit.it/uwsgi/\n\n.. _[dev-picayune2008] : http://www.devpicayune.com/entry/hosting-django-with-cherrypy-wsgi-server Using middleware to add logging and serve the admin media files. Paste TransLogger.\n\n.. _[arteme2009] : http://www.arteme.fi/2009/02/26/django-cherrypy-dev-server-and-static-files/ More on serving admin files and static files in general with wsgiserver.", "description_content_type": null, "docs_url": null, "download_url": "http://bitbucket.org/cleemesser/django-cherrypy-wsgiserver/downloads", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/cleemesser/django-cherrypy-wsgiserver/downloads", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-wsgiserver", "package_url": "https://pypi.org/project/django-wsgiserver/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-wsgiserver/", "project_urls": { "Download": "http://bitbucket.org/cleemesser/django-cherrypy-wsgiserver/downloads", "Homepage": "http://bitbucket.org/cleemesser/django-cherrypy-wsgiserver/downloads" }, "release_url": "https://pypi.org/project/django-wsgiserver/0.6.10/", "requires_dist": null, "requires_python": null, "summary": "django-wsgiserver installs a web server for Django using CherryPy's WSGI server.", "version": "0.6.10" }, "last_serial": 830961, "releases": { "0.6.1": [], "0.6.10": [ { "comment_text": "", "digests": { "md5": "394c6d1472d4599fd951b0bddd8ba0b7", "sha256": "e8263310c98b1c54d42d83e349f519fe5698dd4be0bad4ac6d57a5dcabef295d" }, "downloads": -1, "filename": "django-wsgiserver-0.6.10.tar.gz", "has_sig": false, "md5_digest": "394c6d1472d4599fd951b0bddd8ba0b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35454, "upload_time": "2011-08-22T09:41:58", "url": "https://files.pythonhosted.org/packages/b1/a2/1d3fdc4eae12e1467f5b7559d0dfd8070a1beed42ff6c23a53d4831d07c5/django-wsgiserver-0.6.10.tar.gz" } ], "0.6.2": [], "0.6.4": [], "0.6.5": [ { "comment_text": "", "digests": { "md5": "f593cb48d8fc719ace479d7b276d7252", "sha256": "b7e14f411291745ce8698db131a96dfa8d2a6f27f64ac22c6852ed1d562d0a9c" }, "downloads": -1, "filename": "django-wsgiserver-0.6.5.tar.gz", "has_sig": false, "md5_digest": "f593cb48d8fc719ace479d7b276d7252", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30011, "upload_time": "2010-09-07T05:41:08", "url": "https://files.pythonhosted.org/packages/a8/d8/3e4edcde25bafce03bcfed294d7eed65420474a649a63a718ee869324e90/django-wsgiserver-0.6.5.tar.gz" } ], "0.6.6": [ { "comment_text": "", "digests": { "md5": "c355ef0cc341cd5f349a5deb85e98412", "sha256": "c3be1dda0c7251d48a5962880b4e45ae3b74bece0242f223f8128dc939723e03" }, "downloads": -1, "filename": "django-wsgiserver-0.6.6.tar.gz", "has_sig": false, "md5_digest": "c355ef0cc341cd5f349a5deb85e98412", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29864, "upload_time": "2010-10-30T12:45:59", "url": "https://files.pythonhosted.org/packages/3a/20/80b51013d24c7c474e8dd7153fffbdb1ab233c360510c19ac83aa6feff0f/django-wsgiserver-0.6.6.tar.gz" } ], "0.6.7": [ { "comment_text": "", "digests": { "md5": "94219c673a680992c9bfdebc4ca97324", "sha256": "6a71d08eae78b1c4f12902542755cdb7299d7aab7a9905fbf1974eeef7b4864a" }, "downloads": -1, "filename": "django-wsgiserver-0.6.7.tar.gz", "has_sig": false, "md5_digest": "94219c673a680992c9bfdebc4ca97324", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34432, "upload_time": "2010-10-31T05:10:40", "url": "https://files.pythonhosted.org/packages/2c/99/65635a222b254d440ba27c2c168fa869756257d021433eb8d538e1559da3/django-wsgiserver-0.6.7.tar.gz" } ], "0.6.9": [ { "comment_text": "", "digests": { "md5": "407f9c4bdf397afbf728cf7774029dbe", "sha256": "16b34187d4b9733a91bb91b8dbbbd14caa8d44fa1926e045533520e589e0461f" }, "downloads": -1, "filename": "django-wsgiserver-0.6.9.tar.gz", "has_sig": false, "md5_digest": "407f9c4bdf397afbf728cf7774029dbe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34618, "upload_time": "2010-11-08T21:27:18", "url": "https://files.pythonhosted.org/packages/e8/be/9c502b9c71285d26135a4c1414ed2b0000ff50785d1b7dbb1aad63a35bf4/django-wsgiserver-0.6.9.tar.gz" } ], "0.8.0beta": [ { "comment_text": "", "digests": { "md5": "f93dd0c778676694690ffeef4fc71e70", "sha256": "4a64faf219ff4dfa5a3601717c800c5c8372b9088544b6bd61347b1d60719b2c" }, "downloads": -1, "filename": "django-wsgiserver-0.8.0beta.tar.gz", "has_sig": false, "md5_digest": "f93dd0c778676694690ffeef4fc71e70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 131199, "upload_time": "2013-06-07T14:18:35", "url": "https://files.pythonhosted.org/packages/df/a1/d965b2a4351b3d3521ffb5c9ecca957b84321c832c0e824c9f99961acf50/django-wsgiserver-0.8.0beta.tar.gz" } ], "0.8.0rc1": [ { "comment_text": "", "digests": { "md5": "9eabe9a8adb53df8837957044c671294", "sha256": "53a1012ea516c0c2f8a7bbdf0c69926c8c53635e3ab5689a211a500abd16aca7" }, "downloads": -1, "filename": "django-wsgiserver-0.8.0rc1.tar.gz", "has_sig": false, "md5_digest": "9eabe9a8adb53df8837957044c671294", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 136513, "upload_time": "2013-08-02T15:39:03", "url": "https://files.pythonhosted.org/packages/25/7e/4207ac84371f087419cb0ad3a2d97d333293975283e7c43bc30fdbf0db07/django-wsgiserver-0.8.0rc1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "394c6d1472d4599fd951b0bddd8ba0b7", "sha256": "e8263310c98b1c54d42d83e349f519fe5698dd4be0bad4ac6d57a5dcabef295d" }, "downloads": -1, "filename": "django-wsgiserver-0.6.10.tar.gz", "has_sig": false, "md5_digest": "394c6d1472d4599fd951b0bddd8ba0b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35454, "upload_time": "2011-08-22T09:41:58", "url": "https://files.pythonhosted.org/packages/b1/a2/1d3fdc4eae12e1467f5b7559d0dfd8070a1beed42ff6c23a53d4831d07c5/django-wsgiserver-0.6.10.tar.gz" } ] }