run

async AsyncYouTubeNotifier.run(*, host: str = '0.0.0.0', port: int = 8000, log_level: int = 30, app: FastAPI | None = None, **configs: object) None
Start the FastAPI server to receive push notifications in an existing event

loop and wait until the server stops.

Parameters:
  • host – The host to run the FastAPI server on.

  • port – The port to run the FastAPI server on.

  • log_level – The log level to use for the uvicorn server.

  • app – The FastAPI app instance to use. If not provided, a new instance will be created.

  • configs – Additional arguments to pass to the Config class of uvicorn.

Raises:

ValueError – If the given app instance has a route that conflicts with the notifier’s routes.