Skip to main content

Documentation License Python-versions PyPI - Version

Declearn: a modular and extensible framework for Federated Learning


Introduction

declearn is a python package providing with a framework to perform federated learning, i.e. to train machine learning models by distributing computations across a set of data owners that, consequently, only have to share aggregated information (rather than individual data samples) with an orchestrating server (and, by extension, with each other).

The aim of declearn is to provide both real-world end-users and algorithm researchers with a modular and extensible framework that:

  • builds on abstractions general enough to write backbone algorithmic code agnostic to the actual computation framework, statistical model details or network communications setup
  • designs modular and combinable objects, so that algorithmic features, and more generally any specific implementation of a component (the model, network protocol, client or server optimizer...) may easily be plugged into the main federated learning process - enabling users to experiment with configurations that intersect unitary features
  • provides with functioning tools that may be used out-of-the-box to set up federated learning tasks using some popular computation frameworks (scikit- learn, tensorflow, pytorch...) and federated learning algorithms (FedAvg, Scaffold, FedYogi...)
  • provides with tools that enable extending the support of existing tools and APIs to custom functions and classes without having to hack into the source code, merely adding new features (tensor libraries, model classes, optimization plug-ins, orchestration algorithms, communication protocols...) to the party

At the moment, declearn has been focused on so-called "centralized" federated learning that implies a central server orchestrating computations, but it might become more oriented towards decentralized processes in the future, that remove the use of a central agent.

Setup

TL;DR:

  • Use pip install declearn to install the package's latest release from PyPI.
  • Use pip install declearn[all] to install all extra dependencies, that notably include network communication and machine learning frameworks.
  • You may be picky as to the extra dependencies you want to install: for that, please have a look at the [project.optional-dependencies] section of the pyproject.toml file.

If you want to read more about how to setup for and finally install declearn, you may read the installation guide

Quickstart

Our quickstart example is the right place to start with if you want too see in a glance what end-user declearn code looks like.

Usage of the Python API

The user guide is the natural entrypoint to learn more about declearn's take on Federated Learning, the current package capabilities, how to implement your own use case, and the structure and key points of the package's API.

To dive directly into the code's documentation, you may also jump to the API reference.

Developers

Information for developers, such as how to contribute, coding rules, and how to run the tests, can be found in the developer guide.

Copyright

Declearn is an open-source software developed by people from the Magnet team at Inria.

Authors

Current core developers are listed under the pyproject.toml file. A more detailed acknowledgement and history of authors and contributors to declearn can be found in the AUTHORS file.

License

Declearn distributed under the Apache-2.0 license. All code files should therefore contain the following mention, which also applies to the present README file:

Copyright 2026 Inria (Institut National de Recherche en Informatique
et Automatique)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

declearn-2.9.0.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

declearn-2.9.0-py3-none-any.whl (539.1 kB view details)

Uploaded Python 3

File details

Details for the file declearn-2.9.0.tar.gz.

File metadata

  • Download URL: declearn-2.9.0.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for declearn-2.9.0.tar.gz
Algorithm Hash digest
SHA256 235946783d84f974465bb90e2d07eaf746108f86f98505dea7eac34b9462ed60
MD5 a8ad8985b6a88bbb1c1469ed10adcb5e
BLAKE2b-256 2f5a051a55a1a6bea572b1ad43b055cf10872dd73bbc49e3494223d97260aa7c

See more details on using hashes here.

File details

Details for the file declearn-2.9.0-py3-none-any.whl.

File metadata

  • Download URL: declearn-2.9.0-py3-none-any.whl
  • Upload date:
  • Size: 539.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for declearn-2.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1630c5ad4d278fdbfda3548a6f54749680af0cbc1fd8a7cae4747bfd7103d016
MD5 237edac7aeb72ee47413aba9f4f46c37
BLAKE2b-256 bea5232d856aa455c708611d80c7d85671086f522c73fb915fba51528cf4e25a

See more details on using hashes here.

Release history Release notifications | RSS feed

2.9.1

2 files

This release

2.9.0 This release

2 files

2.8.0

2 files

2.7.0

2 files

2.6.1

2 files

2.6.0.post1

2 files

2.5.1

2 files

2.5.0

2 files

2.4.1

2 files

2.4.0

2 files

2.3.2

2 files

2.3.1

2 files

2.3.0

2 files

2.2.2

2 files

2.2.1

2 files

2.2.0

2 files

2.1.1

2 files

2.1.0

2 files

2.0.3

2 files

2.0.2.2

2 files

2.0.1

2 files

2.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page