Como executar o FASTAPI com código Python

# method 1. in terminal
$uvicorn main:app --reload

# method 2. run with python code
import os
def run():
    os.system('uvicorn main:app --reload')


if __name__ == '__main__':

    run()
Shanti