flwr
Flower: A Friendly Federated AI Framework
What it is and what it does
Flower is a framework for implementing federated learning systems—distributed machine learning where model training happens across multiple clients that retain their data locally, with only model updates sent to a central server for aggregation. It abstracts away the complexity of coordinating training across heterogeneous devices and frameworks, allowing researchers and practitioners to focus on algorithm design rather than infrastructure. The framework is framework-agnostic and can work with PyTorch, TensorFlow, scikit-learn, JAX, XGBoost, and other ML libraries.
Flower's core dependencies include gRPC and protobuf for client-server communication, cryptography libraries for secure aggregation, FastAPI and Uvicorn for server infrastructure, SQLAlchemy for state management, and rich/typer for CLI tooling. It is designed for customization and extensibility—users can override strategies, define custom client logic, and integrate with their existing ML pipelines. The framework targets both research (with baseline implementations of published algorithms) and production use, supporting modern Python versions (3.11, 3.12, 3.13).
Use it for:
- Train a model across hospitals' patient data without centralizing sensitive medical records.
- Aggregate model updates from mobile devices in a federated learning pipeline using PyTorch or TensorFlow.
- Implement custom federated learning strategies by extending Flower's Strategy class for research experiments.
- Conduct federated analytics on distributed datasets without moving raw data to a central location.
- Deploy a federated learning system with secure aggregation using Flower's cryptography integrations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Flower is a framework for building federated learning systems where machine learning models are trained collaboratively across distributed clients without centralizing raw data.
Yes. Flower is production-stable (Development Status 5), actively maintained with recent releases, has no known vulnerabilities, and low install friction. Install it if you need to build federated learning systems or conduct distributed model training while preserving data privacy. The permissive Apache-2.0 license and framework-agnostic design make it suitable for research and commercial use.
Install
flwr on PyPI
pip
pip install flwruv
uv add flwrpoetry
poetry add flwrInstalling flwr
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a release 9 days old and recent commits; 7073 repository stars indicate established community adoption.
License in practice
Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions, making it suitable for both research and production deployments.
Quickstart
pip install flwr
import flwr as fl
strategy = fl.server.strategy.FedAvg()
fl.server.start_server(config=fl.server.ServerConfig(num_rounds=3), strategy=strategy)
Requires Python 3.11 or later; federated learning scenarios typically require multiple client processes or machines to demonstrate value.
Verify before relying
- Whether the framework's gRPC and protobuf dependencies are suitable for all network environments (e.g., restrictive firewalls).
- Performance characteristics and scalability limits for the number of clients and model sizes supported.
- Whether privacy guarantees (differential privacy, secure aggregation) are built-in or require additional implementation.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4.0,>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 23 — numpy, grpcio, grpcio-health-checking, protobuf, cryptography, pycryptodome, iterators, typer, uv, tomli, tomli-w, pathspec, prompt-toolkit, rich, pyyaml, requests, click, packaging, sqlalchemy, alembic, uvicorn, fastapi, starlette |
| Maintenance | actively maintained — 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 188,759/month — #9,938 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flwr-1.33.0-py3-none-any.whl
Keywords: Artificial Intelligence, Federated AI, Federated Analytics, Federated Evaluation, Federated Learning, Flower, Machine Learning
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
flowerFlower is a web-based monitoring and management…
permissive · top 5,000 on PyPI
tensorflowTensorFlow is an open-source machine learning…
permissive · top 5,000 on PyPI
tflite-runtimeTensorFlow Lite runtime enables on-device…
permissive · top 15,000 on PyPI
kerasKeras 3 is a multi-backend deep learning…
permissive · top 5,000 on PyPI
fastaifastai is a deep learning library that provides…
permissive · top 15,000 on PyPI
keras-nightlyA multi-backend deep learning framework that…
permissive · top 15,000 on PyPI
tensorflow-cpu-awsTensorFlow CPU for AWS is a machine learning…
permissive · top 15,000 on PyPI
loralibloralib provides PyTorch modules that implement…
permissive · top 15,000 on PyPI
mlxMLX is an array framework for machine learning…
permissive · top 5,000 on PyPI