from typing import Union
import uvicorn
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def helloworld():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: Union[str, None] = None):
return {"item_id": item_id, "q": q}
if _name_ == "__main__":
uvicorn.run(app, host="127.0.0.1", port=5049)
On this page of the site you can watch the video online FASTAPI in Python | Create REST API using FASTAPI framework in python | SWAGGER UI with a duration of hours minute second in good quality, which was uploaded by the user Azure Content : Annu 19 September 2025, share the link with friends and acquaintances, this video has already been watched 458 times on youtube and it was liked by 22 viewers. Enjoy your viewing!