run¶
- YouTubeNotifier.run(*, host: str = '0.0.0.0', port: int = 8000, app: FastAPI = None, log_level: int = 30, **configs: Any) None¶
- Start the FastAPI server to receive push notifications in the
current thread 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.