Skip to content

🏃 💽 ❎ - Uvicorn

👑 👜 👆 💪 🏃 FastAPI 🈸 🛰 💽 🎰 🔫 💽 📋 💖 Uvicorn.

📤 3️⃣ 👑 🎛:

  • Uvicorn: ↕ 🎭 🔫 💽.
  • Hypercorn: 🔫 💽 🔗 ⏮️ 🇺🇸🔍/2️⃣ & 🎻 👪 🎏 ⚒.
  • 👸: 🔫 💽 🏗 ✳ 📻.

💽 🎰 & 💽 📋

📤 🤪 ℹ 🔃 📛 ✔️ 🤯. 👶

🔤 "💽" 🛎 ⚙️ 🔗 👯‍♂️ 🛰/☁ 💻 (⚛ ⚖️ 🕹 🎰) & 📋 👈 🏃‍♂ 🔛 👈 🎰 (✅ Uvicorn).

✔️ 👈 🤯 🕐❔ 👆 ✍ "💽" 🏢, ⚫️ 💪 🔗 1️⃣ 📚 2️⃣ 👜.

🕐❔ 🔗 🛰 🎰, ⚫️ ⚠ 🤙 ⚫️ 💽, ✋️ 🎰, 💾 (🕹 🎰), 🕸. 👈 🌐 🔗 🆎 🛰 🎰, 🛎 🏃‍♂ 💾, 🌐❔ 👆 🏃 📋.

❎ 💽 📋

👆 💪 ❎ 🔫 🔗 💽 ⏮️:

  • Uvicorn, 🌩-⏩ 🔫 💽, 🏗 🔛 uvloop & httptool.
$ pip install "uvicorn[standard]"

---> 100%

Tip

standard, Uvicorn 🔜 ❎ & ⚙️ 👍 ➕ 🔗.

👈 ✅ uvloop, ↕-🎭 💧-♻ asyncio, 👈 🚚 🦏 🛠️ 🎭 📈.

  • Hypercorn, 🔫 💽 🔗 ⏮️ 🇺🇸🔍/2️⃣.
$ pip install hypercorn

---> 100%

...⚖️ 🙆 🎏 🔫 💽.

🏃 💽 📋

👆 💪 ⤴️ 🏃 👆 🈸 🎏 🌌 👆 ✔️ ⌛ 🔰, ✋️ 🍵 --reload 🎛, ✅:

$ uvicorn main:app --host 0.0.0.0 --port 80

<span style="color: green;">INFO</span>:     Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
$ hypercorn main:app --bind 0.0.0.0:80

Running on 0.0.0.0:8080 over http (CTRL + C to quit)

Warning

💭 ❎ --reload 🎛 🚥 👆 ⚙️ ⚫️.

--reload 🎛 🍴 🌅 🌅 ℹ, 🌅 ⚠, ♒️.

⚫️ ℹ 📚 ⏮️ 🛠️, ✋️ 👆 🚫🔜 🚫 ⚙️ ⚫️ 🏭.

Hypercorn ⏮️ 🎻

💃 & FastAPI ⚓️ 🔛 AnyIO, ❔ ⚒ 👫 🔗 ⏮️ 👯‍♂️ 🐍 🐩 🗃 & 🎻.

👐, Uvicorn ⏳ 🕴 🔗 ⏮️ ✳, & ⚫️ 🛎 ⚙️ uvloop, ↕-🎭 💧-♻ asyncio.

✋️ 🚥 👆 💚 🔗 ⚙️ 🎻, ⤴️ 👆 💪 ⚙️ Hypercorn ⚫️ 🐕‍🦺 ⚫️. 👶

❎ Hypercorn ⏮️ 🎻

🥇 👆 💪 ❎ Hypercorn ⏮️ 🎻 🐕‍🦺:

$ pip install "hypercorn[trio]"
---> 100%

🏃 ⏮️ 🎻

⤴️ 👆 💪 🚶‍♀️ 📋 ⏸ 🎛 --worker-class ⏮️ 💲 trio:

$ hypercorn main:app --worker-class trio

& 👈 🔜 ▶️ Hypercorn ⏮️ 👆 📱 ⚙️ 🎻 👩‍💻.

🔜 👆 💪 ⚙️ 🎻 🔘 👆 📱. ⚖️ 👍, 👆 💪 ⚙️ AnyIO, 🚧 👆 📟 🔗 ⏮️ 👯‍♂️ 🎻 & ✳. 👶

🛠️ 🔧

👫 🖼 🏃 💽 📋 (📧.Ⓜ Uvicorn), ▶️ 👁 🛠️, 👂 🔛 🌐 📢 (0.0.0.0) 🔛 🔁 ⛴ (✅ 80).

👉 🔰 💭. ✋️ 👆 🔜 🎲 💚 ✊ 💅 🌖 👜, 💖:

  • 💂‍♂ - 🇺🇸🔍
  • 🏃‍♂ 🔛 🕴
  • 🧬 (🔢 🛠️ 🏃)
  • 💾
  • ⏮️ 🔁 ⏭ ▶️

👤 🔜 💬 👆 🌅 🔃 🔠 👫 🔧, ❔ 💭 🔃 👫, & 🧱 🖼 ⏮️ 🎛 🍵 👫 ⏭ 📃. 👶