start_driver(*, server_address: str = '[::]:9091', server: Server | None = None, config: ServerConfig | None = None, strategy: Strategy | None = None, client_manager: ClientManager | None = None, root_certificates: bytes | str | None = None, driver: Driver | None = None) History[source]#

Start a Flower Driver API server.

  • server_address (Optional[str]) – The IPv4 or IPv6 address of the Driver API server. Defaults to “[::]:8080”.

  • server (Optional[flwr.server.Server] (default: None)) – A server implementation, either flwr.server.Server or a subclass thereof. If no instance is provided, then start_driver will create one.

  • config (Optional[ServerConfig] (default: None)) – Currently supported values are num_rounds (int, default: 1) and round_timeout in seconds (float, default: None).

  • strategy (Optional[flwr.server.Strategy] (default: None).) – An implementation of the abstract base class flwr.server.strategy.Strategy. If no strategy is provided, then start_server will use flwr.server.strategy.FedAvg.

  • client_manager (Optional[flwr.server.ClientManager] (default: None)) – An implementation of the class flwr.server.ClientManager. If no implementation is provided, then start_driver will use flwr.server.SimpleClientManager.

  • root_certificates (Optional[Union[bytes, str]] (default: None)) – The PEM-encoded root certificates as a byte string or a path string. If provided, a secure connection using the certificates will be established to an SSL-enabled Flower server.

  • driver (Optional[Driver] (default: None)) – The Driver object to use.


hist – Object containing training and evaluation metrics.

Return type:



Starting a driver that connects to an insecure server:

>>> start_driver()

Starting a driver that connects to an SSL-enabled server:

>>> start_driver(
>>>     root_certificates=Path("/crts/root.pem").read_bytes()
>>> )