Quick Start
Get your FastAPI application deployed in minutes with FastAPI Cloud. This guide will walk you through creating and deploying your first app.
Prerequisites
Section titled “Prerequisites”- Python 3.8 or higher.
1. Create Your Project
Section titled “1. Create Your Project”Initialize a new project:
Using uv:
uv init myappcd myapp
2. Install FastAPI
Section titled “2. Install FastAPI”Install FastAPI with all its dependencies:
Using uv:
uv add "fastapi[standard]"
3. Create Your App
Section titled “3. Create Your App”Create a simple FastAPI application. Add this code to main.py
:
from fastapi import FastAPI
app = FastAPI()
@app.get("/")def main(): return {"message": "Hello World"}
4. Login to FastAPI Cloud
Section titled “4. Login to FastAPI Cloud”Authenticate with your FastAPI Cloud account:
fastapi login
This will open your browser to complete the authentication process.
5. Deploy Your App
Section titled “5. Deploy Your App”Deploy your application with a single command:
fastapi deploy
The CLI will automatically detect your FastAPI app and deploy it to the cloud.
Deploying to FastAPI Cloud...🚀 Preparing for liftoff! Almost there...✅ Deployment successful!🚀 Your API is now available at:🐔 Ready the chicken! Your app is ready at https://myapp.fastapicloud.dev
🚀 Your app is now live: https://myapp.fastapicloud.dev
6. Explore Your API
Section titled “6. Explore Your API”FastAPI automatically generates interactive API documentation. Visit your app’s /docs
endpoint to explore the API:
https://myapp.fastapicloud.dev/docs
7. Monitor Your App
Section titled “7. Monitor Your App”Check your application logs in the FastAPI Cloud dashboard:
- Go to FastAPI Cloud Dashboard.
- Go to Apps in the left sidebar.
- Select your app to view its details.
- Click on the Logs tab to see real-time application logs.
8. And that’s it! 🎉
Section titled “8. And that’s it! 🎉”You’ve successfully deployed your first FastAPI application to the cloud.
You code, we cloud.