Skip to content

Python Hello World

Create a file named main.py with the following content:

from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
return {"message": "Hello World"}

Install dependencies and run it locally:

Terminal window
pip install fastapi uvicorn
uvicorn main:app --reload
Terminal window
curl http://localhost:8000
# {"message":"Hello World"}

Ready to deploy? Use the Origin Clouds CLI or SDK to push your app.

Deploy to Origin Clouds →