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 - Learn the Entire API in 2 Minutes
import syft_perm as sp
# 1. Opening files and folders
file = sp.open("data.csv") # Open a file
folder = sp.open("my_project/") # Open a folder
remote = sp.open("syft://alice@datasite.org/data.csv") # Remote files
# 2. Granting permissions (each level includes all lower permissions)
file.grant_read_access("bob@company.com") # Can view
file.grant_create_access("alice@company.com") # Can view + create new files
file.grant_write_access("team@company.com") # Can view + create + modify
file.grant_admin_access("admin@company.com") # Full control
# 3. Revoking permissions
file.revoke_read_access("bob@company.com") # Remove all access
file.revoke_create_access("alice@company.com") # Remove create (keeps read)
file.revoke_write_access("team@company.com") # Remove write (keeps read/create)
file.revoke_admin_access("admin@company.com") # Remove admin privileges
# 4. Checking permissions
if file.has_read_access("bob@company.com"):
print("Bob can read this file")
if file.has_create_access("alice@company.com"):
print("Alice can create new files")
if file.has_write_access("team@company.com"):
print("Team can modify this file")
if file.has_admin_access("admin@company.com"):
print("Admin has full control")
# 5. Understanding permissions with explain
explanation = file.explain_permissions("bob@company.com")
print(explanation) # Shows why bob has/doesn't have access
# 6. Working with the Files API
all_files = sp.files.all() # Get all permissioned files
paginated = sp.files.get(limit=10, offset=0) # Get first 10 files
filtered = sp.files.search(admin="me@datasite.org") # My admin files
sliced = sp.files[0:5] # First 5 files using slice
# 7. Moving files while preserving permissions
new_file = file.move_file_and_its_permissions("archive/data.csv")
# 8. Interactive features (Jupyter/web)
file.share # Show sharing widget
Permission Hierarchy Explained
- Read: View file contents
- Create: Read + create new files in folders
- Write: Read + Create + modify existing files
- Admin: Read + Create + Write + manage permissions
Permission Hierarchy
- Read - View file contents
- Create - Read + create new files
- Write - Read + Create + modify existing files
- Admin - Read + Create + Write + manage permissions
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
Apache 2.0 License - see LICENSE file for details.
Metadata
Release files for syft-perm 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| syft_perm-0.4.0.tar.gz | 202.3 kB | Without provenance | Details for syft_perm-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| syft_perm-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for syft_perm-0.4.0-py3-none-any.whl |
Total release size: 335.5 kB
Release files / syft_perm-0.4.0.tar.gz
| Download URL | syft_perm-0.4.0.tar.gz |
|---|---|
| Size | 202.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb57e45e0d630a516d741882be18b090e3079d07239f90f2c07c75cb7eaea9bb
|
|
BLAKE2b-256 checksum How to use checksums |
2bc102592142a670dada8f5abef596ca605862831dde4f756d6f7d4832e51ddb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.17
|
Release files / syft_perm-0.4.0-py3-none-any.whl
| Download URL | syft_perm-0.4.0-py3-none-any.whl |
|---|---|
| Size | 133.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39c282ce51fb66b5b91576f474cea1388a385c917def0ffed5d2881e64481c74
|
|
BLAKE2b-256 checksum How to use checksums |
69c14cb6783b009a8a584df135ee594f62a832b2efeb7c1a4655cc037bfc355b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.17
|
Security for syft-perm 0.4.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.