from fastapi import FastAPI from fastapi_profiler import Profiler as FastapiProfilerMiddleware from plugin.base import Plugin class Profiler(Plugin): def __init__(self, app: FastAPI, dashboard_path: str = "/profiler"): self.app = app self.dashboard_path = dashboard_path self.name = "Profiler" self.version = "1.0.0" def install(self): FastapiProfilerMiddleware(self.app, self.dashboard_path)