{ "info": { "author": "Peter Baumgartner", "author_email": "pete@lincolnloop.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# django-pyuwsgi\n\nRun [pyuwsgi](https://pypi.org/project/pyuwsgi/) (aka uWSGI) as a Django management command.\n\n----\n\n[![build status](https://travis-ci.org/lincolnloop/django-pyuwsgi.svg?branch=master)](https://travis-ci.org/lincolnloop/django-pyuwsgi) [![pypi](https://img.shields.io/pypi/v/django-pyuwsgi.svg)](https://pypi.org/pypi/django-pyuwsgi) [![pyversions](https://img.shields.io/pypi/pyversions/django-pyuwsgi.svg)](https://pypi.org/pypi/django-pyuwsgi)\n\n## Usage\n\n1. Install:\n\n ```\n pip install django-pyuwsgi\n ```\n\n2. Add to `INSTALLED_APPS`:\n\n ```python\n INSTALLED_APPS = [\n # ...\n \"django_pyuwsgi\",\n # ...\n ]\n ```\n3. Run:\n\n ```\n manage.py pyuwsgi --socket=:8000 ...\n ```\n\n## Configuration\n\nPyuwsgi already knows the Python interpreter and virtualenv (if applicable) to use from the Django management command environment. By default, it will run with the following flags (using `settings.WSGI_APPLICATION` to determine the module):\n\n```\n--strict --need-app --module={derived}\n```\n\nIf you have `STATIC_URL` defined with a local URL, it will also add `--static-map`, derived from `STATIC_URL` and `STATIC_ROOT`.\n\nYou can pass any additional arguments uWSGI accepts in from the command line.\n\nBut uWSGI has a lot of flags, and many of them, you want every time you run the project. For that scenario, you can configure your own defaults using the optional setting, `PYUWSGI_ARGS`. Here's an example you might find helpful:\n\n```python\nPYUWSGI_ARGS = [\n \"--master\",\n \"--strict\",\n \"--need-app\",\n \"--module\".\n \":\".join(WSGI_APPLICATION.rsplit(\".\", 1)),\n \"--no-orphans\",\n \"--vacuum\",\n \"--auto-procname\",\n \"--enable-threads\",\n \"--offload-threads=4\",\n \"--thunder-lock\",\n \"--static-map\",\n \"=\".join([STATIC_URL.rstrip(\"/\"), STATIC_ROOT]),\n \"--static-expires\",\n \"/* 7776000\",\n]\n```\n\nDon't forget to also set something like `--socket=:8000` or `--http=:8000` so your app listens on a port. Depending on your setup, it may make more sense to pass this in via the command line than hard-coding it in your settings. \n\n## Motivation\n\nIn some scenarios, it is beneficial to distribute a Django project with a single entrypoint for command-line interaction. This can come in handy when building Docker containers or self-contained Python apps with something like [shiv](https://github.com/linkedin/shiv).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lincolnloop/django-pyuwsgi", "keywords": "uwsgi,django,pyuwsgi", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-pyuwsgi", "package_url": "https://pypi.org/project/django-pyuwsgi/", "platform": "", "project_url": "https://pypi.org/project/django-pyuwsgi/", "project_urls": { "Homepage": "https://github.com/lincolnloop/django-pyuwsgi" }, "release_url": "https://pypi.org/project/django-pyuwsgi/1.1.1/", "requires_dist": [ "pyuwsgi (>=2.0.17.2b3)", "Django", "pytest; extra == 'test'" ], "requires_python": "", "summary": "uWSGI as a Django management command", "version": "1.1.1" }, "last_serial": 4314335, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "2c3b8c28e6684f445008a1e78c258e8f", "sha256": "a8fbd30d05f3ce224558320387cdadd4f6e05916e8d2b7d1fa305d1695418dc0" }, "downloads": -1, "filename": "django_pyuwsgi-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2c3b8c28e6684f445008a1e78c258e8f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4337, "upload_time": "2018-09-11T17:36:16", "url": "https://files.pythonhosted.org/packages/e9/ba/5a533f509f0981cb54cfa0cc9d27a62cb70d2d4afcfcbd378d36eac61a68/django_pyuwsgi-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "302d79734c19754f2a200cbc5c383c92", "sha256": "e58b41127772c71e90e5703503967cfa4f9c9b8ef08754f1d20ab1cd49aca105" }, "downloads": -1, "filename": "django-pyuwsgi-1.0.0.tar.gz", "has_sig": false, "md5_digest": "302d79734c19754f2a200cbc5c383c92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2918, "upload_time": "2018-09-11T17:36:18", "url": "https://files.pythonhosted.org/packages/c1/f3/f2c3cc880b3d6794633bae509ce14d05edaaba2abb9c9f93711506f0c514/django-pyuwsgi-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "f2349d9e04569dfdaf30126a21172b77", "sha256": "69b8c903d1d1c6d60293424e71b34020df11122919ae982bed54b9635cd05d59" }, "downloads": -1, "filename": "django_pyuwsgi-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f2349d9e04569dfdaf30126a21172b77", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5317, "upload_time": "2018-09-26T22:14:12", "url": "https://files.pythonhosted.org/packages/71/58/fe0a055abc4431cf24badeee89e20a8f59c536fdf38175c557980a7b9183/django_pyuwsgi-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b5b1c8661c858f4157d1a5bb917bc65a", "sha256": "7e0a0e3ac709b480ec1e8e122ac5e1bac441aaf49235c2a6a6e929b52f4513a9" }, "downloads": -1, "filename": "django-pyuwsgi-1.1.0.tar.gz", "has_sig": false, "md5_digest": "b5b1c8661c858f4157d1a5bb917bc65a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3945, "upload_time": "2018-09-26T22:14:13", "url": "https://files.pythonhosted.org/packages/ed/66/55751039eec2bb5d11ebef771b763592ebc6e1629f23fda097dc5325d77a/django-pyuwsgi-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "2a8321529e0b5f7f19e2dc7433de9cda", "sha256": "8a4413bb6f12dc5ba8031a9151f2eec5a8f77756e7ea0fb593c53b00d7a9f49e" }, "downloads": -1, "filename": "django_pyuwsgi-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2a8321529e0b5f7f19e2dc7433de9cda", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5321, "upload_time": "2018-09-26T22:18:03", "url": "https://files.pythonhosted.org/packages/ba/b1/bd98df4d2ce93b6ac22515a79aaf2f746015e0266227ca76bc09f1971fa0/django_pyuwsgi-1.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dddd97c8777fb407e0acc498fb09d02a", "sha256": "ae83b8b7caf85b299b56a6100a5a3ba3758a6d91604dbb9cedc1e7f46b21dd3e" }, "downloads": -1, "filename": "django-pyuwsgi-1.1.1.tar.gz", "has_sig": false, "md5_digest": "dddd97c8777fb407e0acc498fb09d02a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3946, "upload_time": "2018-09-26T22:18:04", "url": "https://files.pythonhosted.org/packages/a7/4b/bd750b825d455e031b3e025134c86bb1d59172bfe796d94a0ad41fe19c1b/django-pyuwsgi-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2a8321529e0b5f7f19e2dc7433de9cda", "sha256": "8a4413bb6f12dc5ba8031a9151f2eec5a8f77756e7ea0fb593c53b00d7a9f49e" }, "downloads": -1, "filename": "django_pyuwsgi-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2a8321529e0b5f7f19e2dc7433de9cda", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5321, "upload_time": "2018-09-26T22:18:03", "url": "https://files.pythonhosted.org/packages/ba/b1/bd98df4d2ce93b6ac22515a79aaf2f746015e0266227ca76bc09f1971fa0/django_pyuwsgi-1.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dddd97c8777fb407e0acc498fb09d02a", "sha256": "ae83b8b7caf85b299b56a6100a5a3ba3758a6d91604dbb9cedc1e7f46b21dd3e" }, "downloads": -1, "filename": "django-pyuwsgi-1.1.1.tar.gz", "has_sig": false, "md5_digest": "dddd97c8777fb407e0acc498fb09d02a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3946, "upload_time": "2018-09-26T22:18:04", "url": "https://files.pythonhosted.org/packages/a7/4b/bd750b825d455e031b3e025134c86bb1d59172bfe796d94a0ad41fe19c1b/django-pyuwsgi-1.1.1.tar.gz" } ] }