$npx skillfedfor your agent

django-guardian

Per object permissions for Django

Worth itPyPI Python ModulesReleased Jul 20261.1M downloads / moBSD-2-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_guardian-3.3.3-py3-none-any.whl
v3.3.3 · released 2026-07-22 · Python >=3.10 · 2 runtime deps: django, typing_extensions

Yes. django-guardian is a mature, actively maintained library with no known vulnerabilities, low install friction, and permissive licensing. It solves a real problem—per-object permissions—that Django's built-in system does not address. Use it when you need fine-grained access control beyond model-level permissions.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires running `python manage.py migrate` to create guardian database tables after installation.
  • Low friction install with only django and typing_extensions as runtime dependencies.
  • The package is actively maintained with a recent release (23 days old) and has been stable since its early releases, supporting Django 3.2 through 5.2 and Python 3.10–3.14.

License · maintenance · safety

BSD-2-Clause (permissive) — BSD-2-Clause is permissive, allowing commercial use, modification, and distribution with minimal restrictions—suitable for most projects.

last release 2026-07-22 (23 days) · last repo commit 2026-07-30 · 3,910 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,082,111 downloads/mo, #4,395 on PyPI

Verify before relying

pip install django-guardian

# In settings.py:
INSTALLED_APPS = (..., 'guardian')
AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'guardian.backends.ObjectPermissionBackend',
)

# Then:
from guardian.shortcuts import assign_perm
assign_perm('change_group', user, obj=group_instance)
  • Performance impact when checking permissions on large numbers of objects or users.
  • Compatibility with custom authentication backends beyond those documented.
Same gist for agents: .md · .json

What it is and what it does

django-guardian extends Django's built-in permission system to support per-object (row-level) access control. Instead of granting a user permission to change all instances of a model, you can grant permission to change a specific instance. It works by adding an extra authentication backend and database tables to track object-level grants for users and groups.

The package integrates directly into Django's permission checking—you use the same `has_perm()` method but pass an object instance as a third argument. It also provides admin integration through `GuardedModelAdmin` so you can manage object permissions in the Django admin panel. The library is widely used in production and supports modern Django versions (3.2–5.2) and Python 3.10+.

Use it for

  • Grant specific team members access to edit only their own projects or documents in a multi-tenant app.
  • Implement row-level security where users can only view/modify records they own or have been assigned.
  • Build admin panels where staff can manage permissions for individual model instances without code changes.
  • Control access to sensitive objects (e.g., reports, files) on a per-user or per-group basis within a single model.
  • Enforce organizational hierarchies where managers can only access records for their department or team.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

django-guardian is a mature, actively maintained library with no known vulnerabilities, low install friction, and permissive licensing. It solves a real problem—per-object permissions—that Django's built-in system does not address. Use it when you need fine-grained access control beyond model-level permissions.

Install

django-guardian on PyPI

Before you install

Low friction install with only django and typing_extensions as runtime dependencies. The package is actively maintained with a recent release (23 days old) and has been stable since its early releases, supporting Django 3.2 through 5.2 and Python 3.10–3.14.

Requires running `python manage.py migrate` to create guardian database tables after installation.

License in practice

BSD-2-Clause is permissive, allowing commercial use, modification, and distribution with minimal restrictions—suitable for most projects.

Quickstart

pip install django-guardian

# In settings.py:
INSTALLED_APPS = (..., 'guardian')
AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'guardian.backends.ObjectPermissionBackend',
)

# Then:
from guardian.shortcuts import assign_perm
assign_perm('change_group', user, obj=group_instance)

Verify before relying

  • Performance impact when checking permissions on large numbers of objects or users.
  • Compatibility with custom authentication backends beyond those documented.

Package facts

LicenseBSD-2-Clause permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
djangotyping_extensions
MaintenanceActively maintained 23 days since the last release
Last repo commit
First released
Downloads1,082,111 / month, #4,395 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 3.2Framework :: Django :: 4.1Framework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: SecurityTopic :: Software Development :: Libraries :: Python Modules

Evidence: django_guardian-3.3.3-py3-none-any.whl

Tags

Capabilities
django per-object permissionsrow-level access control djangoobject-level authorizationdjango instance permissionsfine-grained django permissionsdjango object permissions backenddjango row permissions
Topics
authorizationrow-level-securitydjango-extension
PyPI keywords
djangopermissionsauthorizationobjectrowlevel

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “django per-object permissions”

  • django-guardiandjango-guardian adds per-object permission checks to Django, letting…
  • djangorestframework-guardianIntegrates django-guardian's object-level permissions into Django…
  • rulesrules provides object-level permission checking for Django…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also djangorestframework-guardian · django-object-actions · dry-rest-permissions · bridgekeeper · djangorestframework-role-filters · django-prbac · django-read-only · django-hijack · rules · drf-access-policy