Move uvicorn import to usage (#502)

This commit is contained in:
Dan Lapid 2025-04-15 15:51:02 +01:00 • committed by GitHub
commit 8c9269c34b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,7 +15,6 @@ from typing import Any, Generic, Literal
import anyio
import pydantic_core
import uvicorn
from pydantic import BaseModel, Field
from pydantic.networks import AnyUrl
from pydantic_settings import BaseSettings, SettingsConfigDict
@ -466,6 +465,7 @@ class FastMCP:
async def run_sse_async(self) -> None:
"""Run the server using SSE transport."""
import uvicorn
starlette_app = self.sse_app()
config = uvicorn.Config(