Run a Server Manually - Uvicorn - FastAPI
The main thing you need to run a FastAPI application in a remote server machine is an ASGI server program like Uvicorn. There are 3 main alternatives: There's a small detail about names to have in mind. 💡 The word "server" is commonly used to refer to both the remote/cloud computer (the physical or virtual machine) and also the program that is running on that machine (e.g. Uvicorn). Just have that in mind when you read "server" in general, it could refer to one of those two things. When referring to the remote machine, it's common to call it server, but also machine, VM (virtual machine), node. Those all refer to some type of remote machine, normally running Linux, where you run programs. You can install an ASGI compatible server with: Tip By adding the standard, Uvicorn will install and use some recommended extra dependencies. That including uvloop, the high-performance drop-in replacement for asyncio, that provides the big concurrency performance boost. ...or any other ASGI server.
Run a Server Manually ¶ Use the fastapi run Command ¶ In short, use fastapi run to serve your FastAPI application: $ <font color = "#4E9A06" >fastapi</font> run <u style = "text-decoration-style:solid" >main.py</u> <span style="background-color:#009485"><font color="#D3D7CF"> FastAPI </font></span> Starting production server 🚀 Searching for package file structure from directories with <font color="#3465A4">__init__.py</font> files Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font> <span style="background-color:#007166"><font color="#D
Explore this link on the map →related reading
- Deployments Concepts - FastAPIfastapi.tiangolo.com
- Quickstart - Runpod Documentationblog.runpod.io
- uv: An extremely Fast Python Package Manager :: Jane Streetjanestreet.com
- How To Create a React + Flask Project - miguelgrinberg.comblog.miguelgrinberg.com
- Bigger Applications - Multiple Files - FastAPIfastapi.tiangolo.com
- The simplest way to add server sent events to Django 🏺 - Tom Dekanphotondesigner.com
- Sign in to Your Account · Flyfly.io
- Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu | DigitalOceandigitalocean.com
- Self-contained Python scripts with uv - the.dusktreader blogblog.dusktreader.dev
- Turbo MCPmcp.run
- Nginx plus React app on Ubuntu 20.04 - Serverspace.ioserverspace.io
- Use docker with fastapi and redis - Stack Overflowstackoverflow.com