--- id: rest-condition version: "1.0.3" license: MIT license_treatment: permissive maintenance: abandoned --- # rest_condition — Complex permissions flow for django-rest-framework License: permissive · Maintenance: abandoned · Downloads: 94.0K/mo ## What it is and what it does rest_condition is a small utility library that adds boolean logic operators to permission systems. It provides And, Or, and Not operators to build complex permission expressions—for example, allowing access if (Perm1 AND Perm2) OR (NOT Perm2). The library wraps individual permission classes and composes them into a single permission that evaluates the full expression. The package has no runtime dependencies. However, it has been abandoned since 2016 and its classifiers declare support only through Python 3.4, making it a legacy tool. If your project runs on modern Python versions, you should verify compatibility before relying on it in production. Use it for: - Build permission rules that require multiple conditions to be true simultaneously. - Negate a permission to deny access when a condition is met. - Combine permission checks with OR logic to allow access if any one of several conditions is satisfied. - Express complex multi-condition access policies without writing custom permission classes for every combination. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides logical operators (And, Or, Not) to compose complex permission checks in Django REST Framework views, allowing you to combine multiple permission classes with boolean logic. No, unless you are maintaining legacy code already using this package. The library is abandoned (last release 2016-11-01, last commit 2019-01-04) and declares support only through Python 3.4. Modern projects should implement permission composition directly or use actively maintained alternatives. If you must use it, verify compatibility with your current Python and framework versions before deploying. ## Install pip install rest-condition uv add rest-condition poetry add rest-condition ## Installing rest_condition Before you install: High install friction: no runtime dependencies but the package is abandoned (last commit 2019-01-04, 3573 days without release). Classifiers declare support only through Python 3.4, which is severely outdated. Installation will succeed but the codebase is unmaintained. License in practice: MIT license is permissive and poses no restrictions on use or redistribution. You may use, modify, and distribute this package freely in commercial or private projects. Quickstart: pip install rest_condition from rest_condition import ConditionalPermission, C, And, Or, Not # Compose permission expressions permission_classes = [Or(And(Perm1, Perm2), Not(Perm2))] Requires Django and django-rest-framework to be installed separately; no explicit version constraints are declared in the package metadata. Verify before relying: - Whether the package works correctly with modern Python versions despite classifiers only listing through Python 3.4. - Whether the package is compatible with current versions of the frameworks it depends on. - Whether there are known bugs or edge cases in the boolean permission composition logic. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 94.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django rest framework permissions, conditional permissions logic, combine permission classes, boolean permission operators, complex permission flow, django api permissions, django, permissions, legacy [View on SkillFed](https://skillfed.io/packages/rest-condition) · [View on PyPI](https://pypi.org/project/rest-condition/)