Need help with PySyft?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

6.6K Stars 1.5K Forks MIT License 6.5K Commits 202 Opened issues


A library for answering questions using data you cannot see

Services available


Need anything else?

Contributors list

No Data

A library for computing on data
you do not own and cannot see

PySyft is a Python library for secure and private Deep Learning. PySyft decouples private data from model training, using Federated Learning, Differential Privacy, and Encrypted Computation (like Multi-Party Computation (MPC) and Homomorphic Encryption (HE) within the main Deep Learning frameworks like PyTorch and TensorFlow. Join the movement on Slack.

Important note about PySyft 0.2.x: For those looking for the PySyft 0.2.x codebase, it's since been branched off. You can find it here, but OpenMined will not offer official support for this version range. If you're getting started with PySyft for the first time, please ignore this message and read on!

PySyft in Detail

A more detailed explanation of PySyft can be found in the white paper on Arxiv.

PySyft has also been explained in videos on YouTube: - PriCon Sep 2020 Duet Demo - Introduction to Privacy Preserving AI using PySyft by @iamtrask - Introduction to PySyft codebase by @andreiliphd - Differential Privacy & Federated Learning explained using PySyft by Jordan Harrod


PySyft is available on PyPI and Conda.

We recommend that you install PySyft within a virtual environment like Conda, due to its ease of use. If you are using Windows, we suggest installing Anaconda and using the Anaconda Prompt to work from the command line.

$ conda create -n pysyft python=3.8
$ conda activate pysyft
$ conda install jupyter notebook

Version Support

We support Linux, MacOS and Windows and the following Python and Torch versions.


Torch 1.5 Torch 1.6 Torch 1.7



$ pip install syft

This will auto-install PyTorch and other dependencies as required, to run the examples and tutorials. For more information on building from source see the contribution guide here.


Latest official documentation is hosted here:

Duet Examples

All the examples can be played with by launching Jupyter Notebook and navigating to the examples/duet folder.

$ jupyter notebook

WebRTC Signaling Server

To facilitate peer-to-peer connections through firewalls we utilise WebRTC and a signaling server. After connection no traffic is sent to this server.

If you want to run your own signaling server simply run the command:

$ syft-network

Then update your duet notebooks to use the new


Try out the Tutorials

A comprehensive list of Duet Examples can be found here

These tutorials cover how to operate common network types over the Duet API.

High-level Architecture

Start Contributing

The guide for contributors can be found here. It covers all that you need to know to start contributing code to PySyft today.

Also join the rapidly growing community of 7000+ on Slack. The slack community is very friendly and great about quickly answering questions about the use and development of PySyft!


The latest version of PySyft is 0.3.0 however this software is still Beta. If you find a bug please file it in the GitHub issues.

Organizational Contributions

We are very grateful for contributions to PySyft from the following organizations! Udacity | coMind | Arkhn | Dropout Labs --------------------------------------------------------------|--------------------------------------------------------------|---------------------------------------------------------------------------|---------------------------------------------------------------------------


For support in using this library, please join the #lib_pysyft Slack channel. Click here to join our Slack community!


This software is in early beta. Use at your own risk.


Apache License 2.0 FOSSA Status


Most software libraries let you compute over information you own and see inside of machines you control. However, this means that you cannot compute on information without first obtaining (at least partial) ownership of that information. It also means that you cannot compute using machines without first obtaining control over those machines. This is very limiting to human collaboration in all areas of life and systematically drives the centralization of data, because you cannot work with a bunch of data without first putting it all in one (central) place.

The Syft ecosystem seeks to change this system, allowing you to write software which can compute over information you do not own on machines you do not have (general) control over. This not only includes servers in the cloud, but also personal desktops, laptops, mobile phones, websites, and edge devices. Wherever your data wants to live in your ownership, the Syft ecosystem exists to help keep it there while allowing it to be used for computation.

This library is the centerpiece of the Syft ecosystem. It has two primary purposes. You can either use PySyft to:

1) Dynamic: Directly compute over data you cannot see. 2) Static: Create static graphs of computation which can be deployed/scaled at a later date on different compute.

The Syft ecosystem includes libraries which allow for communication with and computation over a variety of runtimes:

  • KotlinSyft (Android)
  • SwiftSyft (iOS)
  • syft.js (Web & Mobile)
  • PySyft (Python)

However, the Syft ecosystem only focuses on consistent object serialization/deserialization, core abstractions, and algorithm design/execution across these languages. These libraries alone will not connect you with data in the real world. The Syft ecosystem is supported by the Grid ecosystem, which focuses on deployment, scalability, and other additional concerns around running real-world systems to compute over and process data (such as data compliance web applications).

Syft is the library that defines objects, abstractions, and algorithms. Grid is the platform which lets you deploy them within a real institution (or on the open internet, but we don't yet recommend this). The Grid ecosystem includes:

  • GridNetwork - think of this like DNS for private data. It helps you find remote data assets so that you can compute with them.
  • PyGrid - This is the gateway to an organization's data, responsible for permissions, load balancing, and governance.
  • GridNode - This is an individual node within an organization's data center, running executions requested by external parties.
  • GridMonitor - This is a UI which allows an institution to introspect and control their PyGrid node and the GridNodes it manages.

Want to Use PySyft?

If you would like to become a user of PySyft, please progress to our User Documentation.

Want to Develop PySyft?

If you would like to become a developer of PySyft, please see our Contributor Documentation. This documentation will help you setup your development environment, give you a roadmap for learning the codebase, and help you find your first project to contribute.


This project has been set up using PyScaffold. For details and usage information on PyScaffold see

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.