Jingwei's

A breath of fresh air in a busy world!

The first Step of FastAPI

The simple way to use FastAPI is as follow,

pip install "fastapi[all]"
pip install "uvicorn[standard]"
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
    return {"message": "Hello World"}

Run the FastAPI.

uvicorn main:app --reload


Add comment:

◎Welcome to take comment to discuss this post.

«    May , 2024    »
Mon Tue Wed Thu Fri Sat Sun
12345
6789101112
13141516171819
20212223242526
2728293031
Categories
Search
Latest Comments
    Archives
    Favorite Sites
    Link Exchange

    Powered By Z-BlogPHP 1.7.3

    Copyright 2024-2028 Jingwei's. All Rights Reserved.