How to Run FastAPI inside Jupyter Ensure you have these installed and accessible from the notebook pyngrok, nest_asyncio, fastapi, uvicorn and other libs you want %pip install pyngrok nest_asyncio fastapi uvicorn loguru Create a FastAPI app from fastapi import FastAPI