Web Frameworks & APIs

uvicorn

The engine that actually gets a fast Python website running, not just written.

Install it: pip install uvicorn

What does it do?

Writing a website’s code is only half the job — something has to actually run it, listen for visitors, and hand off their requests, and that’s exactly what Uvicorn does. Think of it as the delivery driver who takes a finished meal from the kitchen, your code, and gets it to the customer’s door reliably and fast. It’s built specifically for the newer generation of async Python frameworks like FastAPI and Starlette, and it’s usually the very first thing you type when you want to try one of those out.

See it in action

This code creates a simple web page and then actually starts it running, so people can visit it in a browser.

from fastapi import FastAPI
import uvicorn

app = FastAPI()

@app.get("/")
def read_root():
    return {"message": "Hello, world!"}

if __name__ == "__main__":
    uvicorn.run(app, host="0.0.0.0", port=8000)

Why would a non-developer care?

Every FastAPI tutorial anyone has followed online ends with a command that starts Uvicorn — the unglamorous but essential last step that turns code into something you can actually visit in a browser. Without it, even brilliantly written code just sits there doing nothing.

Real-world examples

Because it’s the default recommended server for FastAPI, Uvicorn quietly runs behind a huge number of production APIs at companies of every size, even though most end users will never see its name. Without a server like this, developers would have to hand-build the low-level networking code that listens for and manages incoming traffic.

Who uses it

Anyone running a FastAPI or Starlette application in production or just testing it out on their own laptop.

How it compares to alternatives

Uvicorn is the ASGI-world counterpart to Gunicorn, which does the equivalent job for older WSGI frameworks like Flask and Django; many production setups actually run Uvicorn workers managed by Gunicorn to get the best of both.

Fun fact

Uvicorn’s speed comes partly from uvloop, a drop-in replacement for Python’s built-in event loop that’s built on the same underlying technology as the Node.js runtime.

New to Python and want to actually try libraries like this yourself?

Find a beginner-friendly course

Related libraries