Skip to main content

A simple client library for setting up secure communication channels using Google Drive

Project description

Unit Tests Integration Tests PyPI Python 3.10+ License: Apache 2.0

Syft-client

Syft client lets data scientists submit computations which are ran by data owners on private data — all through cloud storage their organizations already use (Google Drive, Microsoft 365, etc.). No new infrastructure required.

Docs

Features

  • Privacy-preserving — Private data never leaves the data owner's machine; only approved results are shared
  • Transport-agnostic — Works over Google Drive today, extensible to any file-based transport
  • Offline-first — Full functionality even when peers are offline; changes sync when connectivity resumes
  • Peer-to-peer with explicit auth — Data owners must approve each collaborator before any data flows
  • Isolated job execution — Jobs run in sandboxed Python virtual environments with controlled access to private data
  • Dataset sharing with mock/private separation — Data scientists explore mock data, then submit jobs that run on the real thing

Quick Start

uv pip install syft-client
import syft_client as sc
# Login (colab auth, for non-colab pass token_path)
do = sc.login_do(email="do@org.com")
ds = sc.login_ds(email="ds@org.com")

# Peer request & approve
ds.add_peer("do@org.com")
do.approve_peer_request("ds@org.com")

# Create & sync dataset
do.create_dataset(
    name="census",
    mock_path="mock.txt",
    private_path="private.txt",
    users=["ds@org.com"],
)
do.sync(); ds.sync()
datasets = ds.datasets.get_all()

Write an analysis.py that reads the dataset and produces a result in our case this is just the length of the data. Inside a job, resolve_dataset_file_path automatically resolves to the private data:

# analysis.py
import json
import syft_client as sc

data_path = sc.resolve_dataset_file_path("census")
with open(data_path, "r") as f:
    data = f.read()

with open("outputs/result.json", "w") as f:
    json.dump({"length": len(data)}, f)

Submit the job and retrieve results:

# Submit job
ds.submit_python_job(
    user="do@org.com",
    code_path="analysis.py",
)
ds.sync(); do.sync()

# Data owner Approves & runs job
do.jobs[0].approve()
do.process_approved_jobs(share_outputs_with_submitter=True)
do.sync(); ds.sync()
result = open(ds.jobs[-1].output_paths[0]).read()

Packages

Package Description
syft-datasets Dataset management and sharing
syft-job Job submission and execution
syft-permissions Permission system for Syft datasites
syft-perms User-facing permission API for Syft datasites
syft-bg Background services TUI dashboard for SyftBox
syft-notebook-ui Jupyter notebook display utilities

Development

# Install in development mode
uv pip install -e .

# Run tests
just test-unit          # Unit tests (fast, mocked)
just test-integration   # Integration tests (slow, real API)

Built by OpenMined — building open-source technology for privacy-preserving data science and AI.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

syft_client-0.1.114.tar.gz (103.5 kB view details)

Uploaded Source

Built Distribution

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

syft_client-0.1.114-py3-none-any.whl (120.9 kB view details)

Uploaded Python 3

File details

Details for the file syft_client-0.1.114.tar.gz.

File metadata

  • Download URL: syft_client-0.1.114.tar.gz
  • Upload date:
  • Size: 103.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for syft_client-0.1.114.tar.gz
Algorithm Hash digest
SHA256 8e99fa44e7d5aded924bdb46b1a714fe2822fb8ba7ef24a2dd22f6529a933c76
MD5 278abbbac837bf21001b3dc9873eeaf6
BLAKE2b-256 3f8d28e92b031b8ebbd079023ca05846482abca1f4abbc0f5357789fe96653a7

See more details on using hashes here.

File details

Details for the file syft_client-0.1.114-py3-none-any.whl.

File metadata

  • Download URL: syft_client-0.1.114-py3-none-any.whl
  • Upload date:
  • Size: 120.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for syft_client-0.1.114-py3-none-any.whl
Algorithm Hash digest
SHA256 c7c53c0457daedc7a9d8b7977cc656b75905a199cc1e0c0ec2dea356c6cef0b2
MD5 7d0f235c3775fad0b8c10aaba243bb8b
BLAKE2b-256 c91e8eac4474c0b9dd4e6f7a535000bb765a19d98c44036cbf379bf5e29ba60d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page