{"title":"Conas Django a úsáid le Uvicorn","version":"6.1","locale":"ga","docname":"howto/deployment/asgi/uvicorn","url":"/ga/6.1/howto/deployment/asgi/uvicorn/","canonical":"https://djangodocs.dev/ga/6.1/howto/deployment/asgi/uvicorn/","summary":"Is freastalaí ASGI é Uvicorn bunaithe ar uvloop ``agus `httptools`, le béim ar luas. Suiteáil Uvicorn Link to this heading # Is féidir leat Uvicorn a shuiteáil le…","html":"<h1>Conas Django a úsáid le Uvicorn<a class=\"heading-anchor\" href=\"#how-to-use-django-with-uvicorn\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>Is freastalaí ASGI é <a class=\"reference external\" href=\"https://www.uvicorn.dev/\">Uvicorn</a> bunaithe ar uvloop ``agus `httptools`, le béim ar luas.</p>\n<section id=\"installing-uvicorn\">\n<h2>Suiteáil Uvicorn<a class=\"heading-anchor\" href=\"#installing-uvicorn\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Is féidir leat Uvicorn a shuiteáil le <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>uvicorn\n</code></pre></div>\n</section>\n<section id=\"running-django-in-uvicorn\">\n<h2>Rith Django in Uvicorn<a class=\"heading-anchor\" href=\"#running-django-in-uvicorn\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Nuair a shuiteáiltear Uvicorn, tá ordú <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">``</span></a>uvicorn <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">``</span></a>ar fáil a ritheann feidhmchláir ASGI. Ní mór glaoch ar Uvicorn le suíomh modúl ina bhfuil réad iarratais ASGI, agus mar a thugtar ar an bhfeidhmchlár ina dhiaidh sin (scartha le colon).</p>\n<p>Maidir le tionscadal tipiciúil Django, bheadh cuma Uvicorn a thabhairt ar aghaidh:</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>uvicorn<span class=\"w\"> </span>myproject.asgi:application\n</code></pre></div>\n<p>Cuirfidh sé seo tús le próiseas amháin ag éisteacht ar <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">``</span></a>127.0.0. 1:8000 <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">``</span></a>. Éilíonn sé go mbeidh do thionscadal ar chonair Python; chun a chinntiú go rith an t-ordú seo ón eolaire céanna le do chomhad manage.py.</p>\n<p>I mód forbartha, is féidir leat <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">``</span></a>--reload <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">``</span></a>a chur leis chun go gcuirfidh an freastalaí athluchtú aon uair a athraítear comhad ar an diosca.</p>\n<p>&lt;<a class=\"reference external\" href=\"https://www.uvicorn.dev/\">Uvicorn</a>&gt;Le haghaidh úsáide níos airde, léigh an doiciméadú <a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>Uvicorn <a href=\"#id3\"><span class=\"problematic\" id=\"id4\">`</span></a>_ le do thoil.</p>\n</section>\n<section id=\"deploying-django-using-uvicorn-and-gunicorn\">\n<h2>Django a imscaradh ag baint úsáide as Uvicorn agus Gunicorn<a class=\"heading-anchor\" href=\"#deploying-django-using-uvicorn-and-gunicorn\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Is freastalaí láidir gréasáin é <a class=\"reference external\" href=\"https://gunicorn.org/\">Gunicorn</a> a chuireann monatóireacht próisis agus atosú uathoibríoch i bhfeidhm. Is féidir leis seo a bheith úsáideach agus Uvicorn á reáchtáil i dtimpeallacht táirgeachta.</p>\n<p>Chun Uvicorn agus Gunicorn a shuiteáil, bain úsáid as na rudaí seo a leanas:</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>uvicorn<span class=\"w\"> </span>uvicorn-worker<span class=\"w\"> </span>gunicorn\n</code></pre></div>\n<p>Ansin cuir tús le Gunicorn ag baint úsáide as rang oibrithe Uvicorn mar seo:</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>gunicorn<span class=\"w\"> </span>myproject.asgi:application<span class=\"w\"> </span>-k<span class=\"w\"> </span>uvicorn_worker.UvicornWorker\n</code></pre></div>\n</section>","rootId":"how-to-use-django-with-uvicorn","toc":[{"title":"Suiteáil Uvicorn","anchor":"installing-uvicorn","children":[]},{"title":"Rith Django in Uvicorn","anchor":"running-django-in-uvicorn","children":[]},{"title":"Django a imscaradh ag baint úsáide as Uvicorn agus Gunicorn","anchor":"deploying-django-using-uvicorn-and-gunicorn","children":[]}],"breadcrumbs":[{"docname":"howto/index","title":"Treoracha conas","url":"/ga/6.1/howto/"},{"docname":"howto/deployment/index","title":"Conas Django a imscaradh","url":"/ga/6.1/howto/deployment/"},{"docname":"howto/deployment/asgi/index","title":"Conas a imscaradh le ASGI","url":"/ga/6.1/howto/deployment/asgi/"}],"prev":{"docname":"howto/deployment/asgi/hypercorn","title":"Conas Django a úsáid le Hypercorn","url":"/ga/6.1/howto/deployment/asgi/hypercorn/"},"next":{"docname":"howto/deployment/checklist","title":"Seicliosta imscartha","url":"/ga/6.1/howto/deployment/checklist/"},"formats":{"html":"/ga/6.1/howto/deployment/asgi/uvicorn/","markdown":"/ga/6.1/howto/deployment/asgi/uvicorn.md","json":"/ga/6.1/howto/deployment/asgi/uvicorn.json"},"source":"https://github.com/django/django/blob/stable/6.1.x/docs/howto/deployment/asgi/uvicorn.txt","official":"https://docs.djangoproject.com/ga/6.1/howto/deployment/asgi/uvicorn/","inVersions":["6.1","6.0","5.2"],"inLocales":["en","sv","zh-hans","ga","fr","ja","id","it","pt-br","ko","es","el","pl"]}