[](https://github.com/OpenMined/syft-perm/actions/workflows/test.yml)
[](https://pypi.org/project/syft-perm/)
[](https://pypi.org/project/syft-perm/)
[](https://pypi.org/project/syft-perm/)
[](https://github.com/psf/black)
[](https://github.com/OpenMined/syft-perm/blob/main/LICENSE)
# 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](https://openmined.github.io/syft-perm/)**
## Installation
```bash
pip install syft-perm
```
## Quick Start - Learn the Entire API in 2 Minutes
```python
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](https://openmined.github.io/syft-perm/quickstart.html)** - Get productive immediately
- **[Comprehensive Tutorials](https://openmined.github.io/syft-perm/tutorials/)** - Master advanced features
- **[API Reference](https://openmined.github.io/syft-perm/api/)** - Complete Python API docs
## Requirements
- Python 3.9+
- Works on Windows, macOS, and Linux
## Contributing
1. Check out our [GitHub Issues](https://github.com/OpenMined/syft-perm/issues)
2. Read the [Contributing Guide](CONTRIBUTING.md)
3. Join the [OpenMined Community](https://openmined.org/)
## License
Apache 2.0 License - see [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "syft-perm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "syftbox, permissions, privacy, federated-learning",
"author": null,
"author_email": "OpenMined <info@openmined.org>",
"download_url": "https://files.pythonhosted.org/packages/2b/c1/02592142a670dada8f5abef596ca605862831dde4f756d6f7d4832e51ddb/syft_perm-0.4.0.tar.gz",
"platform": null,
"description": "[](https://github.com/OpenMined/syft-perm/actions/workflows/test.yml)\n[](https://pypi.org/project/syft-perm/)\n[](https://pypi.org/project/syft-perm/)\n[](https://pypi.org/project/syft-perm/)\n[](https://github.com/psf/black)\n[](https://github.com/OpenMined/syft-perm/blob/main/LICENSE)\n\n# SyftPerm\n\n**File permission management for SyftBox made simple.**\n\nSyftPerm provides intuitive Python APIs for managing SyftBox file permissions with powerful pattern matching, inheritance, and debugging capabilities.\n\n## \ud83d\udcda **[Complete Documentation](https://openmined.github.io/syft-perm/)**\n\n## Installation\n\n```bash\npip install syft-perm\n```\n\n## Quick Start - Learn the Entire API in 2 Minutes\n\n```python\nimport syft_perm as sp\n\n# 1. Opening files and folders\nfile = sp.open(\"data.csv\") # Open a file\nfolder = sp.open(\"my_project/\") # Open a folder\nremote = sp.open(\"syft://alice@datasite.org/data.csv\") # Remote files\n\n# 2. Granting permissions (each level includes all lower permissions)\nfile.grant_read_access(\"bob@company.com\") # Can view\nfile.grant_create_access(\"alice@company.com\") # Can view + create new files\nfile.grant_write_access(\"team@company.com\") # Can view + create + modify\nfile.grant_admin_access(\"admin@company.com\") # Full control\n\n# 3. Revoking permissions\nfile.revoke_read_access(\"bob@company.com\") # Remove all access\nfile.revoke_create_access(\"alice@company.com\") # Remove create (keeps read)\nfile.revoke_write_access(\"team@company.com\") # Remove write (keeps read/create)\nfile.revoke_admin_access(\"admin@company.com\") # Remove admin privileges\n\n# 4. Checking permissions\nif file.has_read_access(\"bob@company.com\"):\n print(\"Bob can read this file\")\n\nif file.has_create_access(\"alice@company.com\"):\n print(\"Alice can create new files\")\n\nif file.has_write_access(\"team@company.com\"):\n print(\"Team can modify this file\")\n \nif file.has_admin_access(\"admin@company.com\"):\n print(\"Admin has full control\")\n\n# 5. Understanding permissions with explain\nexplanation = file.explain_permissions(\"bob@company.com\")\nprint(explanation) # Shows why bob has/doesn't have access\n\n# 6. Working with the Files API\nall_files = sp.files.all() # Get all permissioned files\npaginated = sp.files.get(limit=10, offset=0) # Get first 10 files\nfiltered = sp.files.search(admin=\"me@datasite.org\") # My admin files\nsliced = sp.files[0:5] # First 5 files using slice\n\n# 7. Moving files while preserving permissions\nnew_file = file.move_file_and_its_permissions(\"archive/data.csv\")\n\n# 8. Interactive features (Jupyter/web)\nfile.share # Show sharing widget\n```\n\n### Permission Hierarchy Explained\n- **Read**: View file contents\n- **Create**: Read + create new files in folders\n- **Write**: Read + Create + modify existing files \n- **Admin**: Read + Create + Write + manage permissions\n\n## Permission Hierarchy\n\n- **Read** - View file contents\n- **Create** - Read + create new files \n- **Write** - Read + Create + modify existing files\n- **Admin** - Read + Create + Write + manage permissions\n\n## Learn More\n\n- **[5-Minute Quick Start](https://openmined.github.io/syft-perm/quickstart.html)** - Get productive immediately\n- **[Comprehensive Tutorials](https://openmined.github.io/syft-perm/tutorials/)** - Master advanced features\n- **[API Reference](https://openmined.github.io/syft-perm/api/)** - Complete Python API docs\n\n## Requirements\n\n- Python 3.9+\n- Works on Windows, macOS, and Linux\n\n## Contributing\n\n1. Check out our [GitHub Issues](https://github.com/OpenMined/syft-perm/issues)\n2. Read the [Contributing Guide](CONTRIBUTING.md)\n3. Join the [OpenMined Community](https://openmined.org/)\n\n## License\n\nApache 2.0 License - see [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": null,
"summary": "Minimal utilities for managing SyftBox file permissions",
"version": "0.4.0",
"project_urls": {
"Documentation": "https://github.com/OpenMined/syft-perm#readme",
"Homepage": "https://github.com/OpenMined/syft-perm",
"Issues": "https://github.com/OpenMined/syft-perm/issues",
"Repository": "https://github.com/OpenMined/syft-perm"
},
"split_keywords": [
"syftbox",
" permissions",
" privacy",
" federated-learning"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "69c14cb6783b009a8a584df135ee594f62a832b2efeb7c1a4655cc037bfc355b",
"md5": "5fc296f864f70604a13790f746d77fe9",
"sha256": "39c282ce51fb66b5b91576f474cea1388a385c917def0ffed5d2881e64481c74"
},
"downloads": -1,
"filename": "syft_perm-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5fc296f864f70604a13790f746d77fe9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 133246,
"upload_time": "2025-07-19T05:45:58",
"upload_time_iso_8601": "2025-07-19T05:45:58.587748Z",
"url": "https://files.pythonhosted.org/packages/69/c1/4cb6783b009a8a584df135ee594f62a832b2efeb7c1a4655cc037bfc355b/syft_perm-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2bc102592142a670dada8f5abef596ca605862831dde4f756d6f7d4832e51ddb",
"md5": "77f8d88e1aa56d56bd5a8a6136b17759",
"sha256": "eb57e45e0d630a516d741882be18b090e3079d07239f90f2c07c75cb7eaea9bb"
},
"downloads": -1,
"filename": "syft_perm-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "77f8d88e1aa56d56bd5a8a6136b17759",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 202264,
"upload_time": "2025-07-19T05:46:00",
"upload_time_iso_8601": "2025-07-19T05:46:00.303326Z",
"url": "https://files.pythonhosted.org/packages/2b/c1/02592142a670dada8f5abef596ca605862831dde4f756d6f7d4832e51ddb/syft_perm-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-19 05:46:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "OpenMined",
"github_project": "syft-perm#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "syft-perm"
}