{"title":"How to use Django with Hypercorn","version":"5.1","locale":"es","docname":"howto/deployment/asgi/hypercorn","url":"/es/5.1/howto/deployment/asgi/hypercorn/","canonical":"https://djangodocs.dev/es/5.1/howto/deployment/asgi/hypercorn/","summary":"Hypercorn is an ASGI server that supports HTTP/1, HTTP/2, and HTTP/3 with an emphasis on protocol support. Installing Hypercorn Link to this heading # You can…","html":"<h1>How to use Django with Hypercorn<a class=\"heading-anchor\" href=\"#how-to-use-django-with-hypercorn\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><a class=\"reference external\" href=\"https://hypercorn.readthedocs.io/\">Hypercorn</a> is an ASGI server that supports HTTP/1, HTTP/2, and HTTP/3\nwith an emphasis on protocol support.</p>\n<section id=\"installing-hypercorn\">\n<h2>Installing Hypercorn<a class=\"heading-anchor\" href=\"#installing-hypercorn\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>You can install Hypercorn with <code class=\"docutils literal notranslate\"><span class=\"pre\">pip</span></code>:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>python<span class=\"w\"> </span>-m<span class=\"w\"> </span>pip<span class=\"w\"> </span>install<span class=\"w\"> </span>hypercorn\n</code></pre></div>\n</section>\n<section id=\"running-django-in-hypercorn\">\n<h2>Running Django in Hypercorn<a class=\"heading-anchor\" href=\"#running-django-in-hypercorn\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>When <a class=\"extlink-pypi reference external\" href=\"https://pypi.org/project/Hypercorn/\">Hypercorn</a> is installed, a <code class=\"docutils literal notranslate\"><span class=\"pre\">hypercorn</span></code> command is available\nwhich runs ASGI applications. Hypercorn needs to be called with the\nlocation of a module containing an ASGI application object, followed\nby what the application is called (separated by a colon).</p>\n<p>For a typical Django project, invoking Hypercorn would look like:</p>\n<div class=\"code-block\" data-language=\"shell\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>hypercorn<span class=\"w\"> </span>myproject.asgi:application\n</code></pre></div>\n<p>This will start one process listening on <code class=\"docutils literal notranslate\"><span class=\"pre\">127.0.0.1:8000</span></code>. It\nrequires that your project be on the Python path; to ensure that run\nthis command from the same directory as your <code class=\"docutils literal notranslate\"><span class=\"pre\">manage.py</span></code> file.</p>\n<p>For more advanced usage, please read the <a class=\"reference external\" href=\"https://hypercorn.readthedocs.io/\">Hypercorn documentation</a>.</p>\n</section>","rootId":"how-to-use-django-with-hypercorn","toc":[{"title":"Installing Hypercorn","anchor":"installing-hypercorn","children":[]},{"title":"Running Django in Hypercorn","anchor":"running-django-in-hypercorn","children":[]}],"breadcrumbs":[{"docname":"howto/index","title":"How-to guides","url":"/es/5.1/howto/"},{"docname":"howto/deployment/index","title":"How to deploy Django","url":"/es/5.1/howto/deployment/"},{"docname":"howto/deployment/asgi/index","title":"How to deploy with ASGI","url":"/es/5.1/howto/deployment/asgi/"}],"prev":{"docname":"howto/deployment/asgi/daphne","title":"How to use Django with Daphne","url":"/es/5.1/howto/deployment/asgi/daphne/"},"next":{"docname":"howto/deployment/asgi/uvicorn","title":"How to use Django with Uvicorn","url":"/es/5.1/howto/deployment/asgi/uvicorn/"},"formats":{"html":"/es/5.1/howto/deployment/asgi/hypercorn/","markdown":"/es/5.1/howto/deployment/asgi/hypercorn.md","json":"/es/5.1/howto/deployment/asgi/hypercorn.json"},"source":"https://github.com/django/django/blob/stable/5.1.x/docs/howto/deployment/asgi/hypercorn.txt","official":"https://docs.djangoproject.com/es/5.1/howto/deployment/asgi/hypercorn/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1"],"inLocales":["en","zh-hans","fr","ja","id","it","pt-br","ko","es","el","pl"]}