skillfed

flwr

Flower: A Friendly Federated AI Framework

flwr v1.33.0 188.8K downloads/30d#9,938 on PyPI7,073
Permissive license Apache-2.0 Active released

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 flwr

uv

uv add flwr

poetry

poetry add flwr

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: Implementation :: CPythonTopic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: MathematicsTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

federated learning frameworkdistributed machine learningprivacy-preserving model trainingfederated AI systemsdecentralized model aggregationcollaborative machine learningfederated analytics
federated-learningdistributed-trainingprivacy-preserving

More Software Development packages

Further reading