Minimal utilities for managing SyftBox file permissions
Project description
SyftPerm
File permission management for SyftBox made simple.
SyftPerm provides intuitive Python APIs for managing SyftBox file permissions with powerful pattern matching, inheritance, and debugging capabilities.
📚 Complete Documentation
Installation
pip install syft-perm
Quick Start
import syft_perm as sp
# Open a file or folder
file = sp.open("my_data.txt")
# Grant permissions (higher levels include lower ones)
file.grant_read_access("reviewer@external.org")
file.grant_write_access("colleague@company.com") # Gets read + write
file.grant_admin_access("boss@company.com") # Gets everything
# Use patterns for multiple files
project = sp.open("my_project/")
project.grant_write_access("*.py", "dev@company.com")
project.grant_read_access("docs/**/*.md", "*") # Public docs
# Debug permissions
print(file.explain_permissions("colleague@company.com"))
# Check access
if file.has_write_access("colleague@company.com"):
print("Colleague can modify this file")
# Display beautiful permission tables in Jupyter notebooks
file._repr_html_() # Shows permissions table with compliance info
Permission Hierarchy
- Read - View file contents
- Create - Read + create new files
- Write - Read + Create + modify existing files
- Admin - Read + Create + Write + manage permissions
Key Features
- 🎯 Intuitive Permission Hierarchy - Higher permissions include all lower ones
- 🌟 Powerful Pattern Matching - Use
*.py,docs/**/*.mdto control multiple files - 🔍 Nearest-Node Algorithm - Predictable inheritance from closest permission rules
- 🐛 Built-in Debugging - Trace exactly why permissions work or don't work
- 📁 Folder-Level Efficiency - Set permissions once on directories, files inherit automatically
- 🎮 Interactive Web Editor - Google Drive-style permission management interface
Beautiful Table Display
SyftPerm provides rich table displays for Jupyter notebooks:
# Display permissions table with compliance information
file._repr_html_() # Shows user permissions, file limits, and compliance status
# The table includes:
# • User permissions (Read/Create/Write/Admin)
# • File size vs limits
# • File type compliance (directories, symlinks)
# • Overall compliance status
# • Direct link to web editor
Web Editor
For non-technical users, SyftPerm includes a web interface:
# Get editor URL for any file or folder
url = sp.get_editor_url("my_project/")
print(f"Edit permissions at: {url}")
Learn More
- 5-Minute Quick Start - Get productive immediately
- Comprehensive Tutorials - Master advanced features
- API Reference - Complete Python API docs
Requirements
- Python 3.9+
- Works on Windows, macOS, and Linux
Contributing
- Check out our GitHub Issues
- Read the Contributing Guide
- Join the OpenMined Community
License
MIT License - see LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file syft_perm-0.3.89.tar.gz.
File metadata
- Download URL: syft_perm-0.3.89.tar.gz
- Upload date:
- Size: 136.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2008c6b9be548ae5883f97427bf550e0f80b1ffa7a6a01f258f2f5b94842ee45
|
|
| MD5 |
4a4f8150cea2b2179246d2c162ba752e
|
|
| BLAKE2b-256 |
5a98c06b80d04a10fc104ff6e77e93608b467528e57f96c91b69c3053845fc7f
|
File details
Details for the file syft_perm-0.3.89-py3-none-any.whl.
File metadata
- Download URL: syft_perm-0.3.89-py3-none-any.whl
- Upload date:
- Size: 64.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcb279c0332dfec4f19f0d74781ac23cb1bc34add0ef2fb487c8cc4d2efb6ac2
|
|
| MD5 |
94ce4b5718472383b033423c3ff7f09d
|
|
| BLAKE2b-256 |
f5f4b45ee7a89750d56ca90cac11adbf1f3e61d6462346e19a6bfeac6c676c2f
|