Installation
pip install almasix-permission# orpip install "almasix[permission]"For local package work:
pip install -e ".[dev]"smith vendor:publish --tag=permission-configsmith vendor:publish --tag=permission-migrations# Enable teams / UUID *before* migrating if you need themsmith migrateSet permission.teams or permission.key_type (int | uuid | ulid) in
config before the first migrate when you need those options.
User model
Section titled “User model”Mix HasRoles onto your authenticatable model:
from almasix.auth import AuthenticatableMixinfrom almasix.orm import Modelfrom almasix.permission import HasRoles
class User(HasRoles, AuthenticatableMixin, Model): fillable = ("email", "name", "password")Provider
Section titled “Provider”The package advertises itself via the almasix.providers entry-point group:
[project.entry-points."almasix.providers"]permission = "almasix.permission.provider:PermissionServiceProvider"Or list the provider explicitly in config/app.py. Config merges under
permission.* (not almasix.permission.*).
Published on PyPI from
almasix-dev/almasix-permission.