Syft Permissions Made Simpler

A friendlier way to manage who can access what in SyftBox

🔍 SEE permissions clearly
# In Jupyter notebooks - interactive permission editor
file = syft_perm.open("data.csv")
file  # Shows interactive permission editor widget

# Or view permissions in console:
print(file)  # Shows permission table
# User               Read  Create  Write  Admin  Reason
# alice@example.com  ✓     ✓       ✓              admin.yaml: Admin permission granted
# bob@example.com    ✓                            read.yaml: Pattern '*.txt' matched
+
🎯 SET permissions simply
# Simple API instead of YAML wrestling
file = syft_perm.open("data.csv")
file.grant_read_access("alice@example.com")
file.grant_write_access("bob@company.com")

# Automatically creates/updates syft.pub.yaml
# No manual YAML editing needed!
pip install syft-perm

Works with your existing SyftBox setup • No configuration needed

Why We Built This

SyftBox's YAML-based permissions are powerful and flexible. SyftPerm makes them more accessible.

🤝 Works With SyftBox

No changes to SyftBox core. SyftPerm is a friendly Python layer on top of our existing syft.pub.yaml system.

📚 Lowers Learning Curve

New team members and data scientists can start managing permissions immediately without learning YAML syntax.

🚀 Speeds Development

Less time debugging YAML indentation, more time building privacy-preserving applications.

See It In Action

Interactive widgets that make permission management a breeze

The Whole API

Every single public method and property

Opening Files & Folders

# Open files and folders
file = syft_perm.open("data.csv")
folder = syft_perm.open("project/")
remote = syft_perm.open("syft://user@site/file.txt")

Granting Permissions

# Grant different permission levels
file.grant_read_access("user@example.com")
file.grant_create_access("user@example.com")
file.grant_write_access("user@example.com")
file.grant_admin_access("user@example.com")

Checking Permissions

# Check if user has specific permissions
file.has_read_access("user@example.com")
file.has_create_access("user@example.com")
file.has_write_access("user@example.com")
file.has_admin_access("user@example.com")

Revoking Permissions

# Revoke specific permission levels
file.revoke_read_access("user@example.com")
file.revoke_create_access("user@example.com")
file.revoke_write_access("user@example.com")
file.revoke_admin_access("user@example.com")

Understanding Permissions

# Get detailed explanation of permissions
explanation = file.explain_permissions("user@example.com")
print(explanation)

📖 Learn about all permission reasons →

File Operations

# Move file with permissions preserved
new_file = file.move_file_and_its_permissions("new/path.csv")

Files Browser API

# Browse all files
sp.files                                    # Interactive widget
sp.files.all()                             # Get all files
sp.files.get(limit=10, offset=0)          # Paginated results
sp.files.search("query")                   # Search files
sp.files.search(admin="user@example.com")  # Filter by admin
sp.files.filter(folders=["path1", "path2"]) # Filter by folders
sp.files[0:10]                            # Slice notation

Interactive Widgets

# Display interactive widgets (Jupyter only)
file.share  # Permission sharing widget
file        # File editor with permissions view
sp.files    # File browser widget

Designed for Our Workflow

Built by the team, for the team, to make our daily SyftBox permission work smoother

🔐

Same Power, Better Experience

All the granular control we need, now accessible through Python methods we already know

🌐

Demo-Friendly

Show stakeholders how permissions work without explaining YAML syntax

Faster Debugging

Quickly see why permissions aren't working with explain_permissions()

Under the Hood

SyftPerm respects our existing infrastructure - it just makes it easier to use:

# When you write this Python:
project = syft_perm.open("research_data/")
project.grant_read_access("reviewer@journal.org")
project.grant_write_access("team@university.edu")

# SyftPerm manages the YAML for you:
"""
rules:
  - pattern: '**/*'
    access:
      read:
        - 'reviewer@journal.org'
        - 'team@university.edu'
      write:
        - 'team@university.edu'
"""

# Full compatibility with manual YAML edits!

Take the Tutorial