🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Python Intermediate

What is Uvicorn?

A lightning-fast ASGI server for Python, commonly used to serve FastAPI and other async web applications.

Uvicorn is an ASGI (Asynchronous Server Gateway Interface) server implementation using uvloop and httptools for high performance. It serves modern async Python frameworks like FastAPI, Starlette, and Django (async views). Uvicorn supports HTTP/1.1, WebSockets, and can handle thousands of concurrent connections efficiently. In production, it is typically run behind Gunicorn using Uvicorn workers (gunicorn -k uvicorn.workers.UvicornWorker) for process management and graceful restarts. Configuration includes host/port binding, SSL certificates, log levels, and worker count. It replaces WSGI servers like Gunicorn's default worker for async applications.

Related Terms

Python Typing Module
A standard library module providing type hints for function signatures and variables, enabling static analysis without runtime enforcement.
Pathlib
A modern Python module providing an object-oriented interface for filesystem paths, replacing os.path operations.
Context Manager
An object that manages resources by defining setup and cleanup actions using the with statement.
Exception Handling
A mechanism for managing runtime errors using try, except, else, and finally blocks to prevent program crashes.
Python Profiling
Measuring where Python code spends time and memory to identify performance bottlenecks and optimization opportunities.
Generator
A function that yields values one at a time using the yield keyword, enabling memory-efficient iteration over large datasets.
View All Python Terms →