Add role assignment, tenant, and user models#1
Merged
gjovanovicst merged 1 commit intopermissio:mainfrom Nov 29, 2025
Merged
Conversation
* Introduced RoleAssignment, RoleAssignmentCreate, RoleAssignmentRead, and BulkRoleAssignment models for managing role assignments. * Added Tenant, TenantCreate, TenantUpdate, and TenantRead models for tenant management. * Created User, UserCreate, UserUpdate, UserRead, UserRole, and UserSync models for user management. * Implemented serialization methods (from_dict and to_dict) for all models. * Added a synchronous wrapper for the Permissio.io SDK in sync.py. * Updated project metadata in pyproject.toml and added type hints with py.typed. * Refactored tests to align with the new model structure and naming conventions.
There was a problem hiding this comment.
Pull request overview
This pull request renames the SDK from "Permis.io" to "Permissio.io" throughout the codebase, refactoring class names, module references, URLs, and documentation. It also introduces enhanced models for role assignments, adds client-side permission checking logic, and improves pagination handling. The changes align the SDK with the correct branding and add new capabilities for managing permissions locally.
Key changes include:
- Renaming all
Permisreferences toPermissio(classes, configs, errors, APIs) - Updating the default API URL from
api.permis.iotoapi.permissio.io - Restructuring the
RoleAssignmentmodel with new fields (user,role,tenantas primary keys) - Adding client-side permission checking that fetches role assignments and evaluates permissions locally
- Enhancing pagination support to handle both nested and flat response formats
- Adding
include_total_countparameter to list endpoints
Reviewed changes
Copilot reviewed 37 out of 38 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_sdk.py | Updated all test imports and assertions from Permis to Permissio |
| tests/init.py | Updated comment to reference Permissio.io |
| pyproject.toml | Updated package name, description, URLs, and metadata to Permissio.io |
| permissio/sync.py | Renamed from permisio/sync.py, updated all class references |
| permissio/py.typed | Added PEP 561 type marker file |
| permissio/models/*.py | Updated docstrings and added new model structure for RoleAssignment |
| permissio/errors.py | Renamed all error classes from Permis to Permissio |
| permissio/enforcement/*.py | Updated references in enforcement models |
| permissio/config.py | Updated config classes and default API URL |
| permissio/client.py | Renamed main client class, added init() method and client-side permission checking |
| permissio/api/*.py | Updated API clients with new class names and include_total_count parameter |
| permissio/init.py | New module init with Permissio exports |
| examples/README.md | Updated example documentation references |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce new models for role assignments, tenants, and users to enhance management capabilities. Implement serialization methods and a synchronous wrapper for the Permissio.io SDK. Update project metadata and refactor tests to align with the new structure.