Skip to main content

GitHub Logo

P2PFL - Federated Learning over P2P networks

GitHub license GitHub issues GitHub contributors GitHub forks GitHub stars GitHub activity Coverage badge Slack

P2PFL is a general-purpose open-source library designed for the execution (simulated and in real environments) of Decentralized Federated Learning systems, specifically making use of P2P networks and the gossip protocols.

✨ Key Features

P2PFL offers a range of features designed to make decentralized federated learning accessible and efficient. For detailed information, please refer to our documentation.

Feature Description
🚀 Easy to Use Get started quickly with our intuitive API.
🛡️ Reliable Built for fault tolerance and resilience.
🌐 Scalable Leverages the power of peer-to-peer networks.
🧪 Versatile Experiment in simulated or real-world environments.
🔒 Private Prioritizes data privacy with decentralized architecture.
🧩 Flexible Designed to be easy to modify.
📈 Real-time Monitoring Manage and track experiment through P2PFL Web Services platform.
🧠 ML Frameworks Seamlessly integrate PyTorch, TensorFlow/Keras, and JAX models.
📡 Communication Protocol Agnostic Choose the communication protocol that best suits your needs (e.g., gRPC).
🔌 Integrations Enhanced capabilities through integrations: Hugging Face Datasets, ML frameworks, communication protocols, and Ray for large-scale simulations.

📥 Installation

👨🏼‍💻 For Users

pip install "p2pfl[torch]"

👨🏼‍🔧 For Developers

Open in GitHub Codespaces

🐍 Python (using UV)

git clone https://github.com/p2pfl/p2pfl.git
cd p2pfl
uv sync --all-extras

Note: The above command installs all dependencies (PyTorch, TensorFlow, and Ray). If you only need specific frameworks, you can use:

  • uv sync - Install only core dependencies
  • uv sync --extra torch - Install with PyTorch support
  • uv sync --extra tensorflow - Install with TensorFlow support
  • uv sync --extra ray - Install with Ray support

Use --no-dev to exclude development dependencies.

⚠️ Important for Ray users: If you're using Ray, we recommend activating the virtual environment traditionally instead of using uv run to avoid dependency issues with Ray workers. See the installation guide for details.

🐳 Docker

docker build -t p2pfl .
docker run -it --rm p2pfl bash

🎬 Quickstart

To start using P2PFL, follow our quickstart guide in the documentation.

📚 Documentation & Resources

🤝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines. Please adhere to the project's code of conduct in CODE_OF_CONDUCT.md.

💬 Community

Connect with us and stay updated:

⭐ Star History

A big thank you to the community for your interest in P2PFL! We appreciate your support and contributions.

Star History Chart

📜 License

GNU General Public License, Version 3.0

Metadata

Release files for p2pfl 0.4.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for p2pfl 0.4.4
File Size Uploaded Provenance Actions
p2pfl-0.4.4.tar.gz 5.8 MB With provenance Details for p2pfl-0.4.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for p2pfl 0.4.4
File Interpreter ABI Platform Actions
p2pfl-0.4.4-py3-none-any.whl Python 3 none any Details for p2pfl-0.4.4-py3-none-any.whl

Total release size: 6.9 MB

Release files / p2pfl-0.4.4.tar.gz

Download URL p2pfl-0.4.4.tar.gz
Size 5.8 MB
Tags Source
SHA-256 checksum
How to use checksums
b8831c74e5c1f37af13ee9266c9af63b8b42b7ff56a2f217327ffa1187e56806
BLAKE2b-256 checksum
How to use checksums
0895d68d270e85c35109528f10573270e5cd7523e834fbbaa9a808827f18f949
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2025.

Transparency log

Release files / p2pfl-0.4.4-py3-none-any.whl

Download URL p2pfl-0.4.4-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
028396faaf418ced7e61d2026a0646baa9855787d05e2bd16719e1d0d82a9d73
BLAKE2b-256 checksum
How to use checksums
462eb7df2b7c970216eeb20c1cfd5e7df7407502ec3bf8005a12aa86f13a171c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2025.

Transparency log

Security for p2pfl 0.4.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for p2pfl-0.4.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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