serve¶
- async AsyncYouTubeNotifier.serve(*, host: str = '0.0.0.0', port: int = 8000, log_level: int = 30, app: FastAPI = None, **kwargs: Any) None¶
Start the FastAPI server to receive push notifications in an existing event loop.
- 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.
kwargs – Additional arguments to pass to the Config class of uvicorn.
- Raises:
RuntimeError – If the method is not called from a running event loop.