rest_condition
Complex permissions flow for django-rest-framework
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django and django-rest-framework to be installed separately; no explicit version constraints are declared in the package metadata.
- 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.
License · maintenance · safety
MIT (permissive) — 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.
last release 2016-11-01 (3573 days) · last repo commit 2019-01-04 · 279 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 93,960 downloads/mo, #13,356 on PyPI
Alternatives
Verify before relying
pip install rest_condition
from rest_condition import ConditionalPermission, C, And, Or, Not
# Compose permission expressions
permission_classes = [Or(And(Perm1, Perm2), Not(Perm2))]- 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.
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 on this page. Verify before relying on it.
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
rest-condition on PyPI
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.
Requires Django and django-rest-framework to be installed separately; no explicit version constraints are declared in the package metadata.
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))]
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 | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Abandoned 3,573 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 93,960 / month, #13,356 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4 |
Evidence: rest_condition-1.0.3.tar.gz
Tags
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 › “conditional permissions logic”
- rest_conditionProvides logical operators (And, Or, Not) to compose complex…
- djangorestframework-role-filtersAdds role-based access control to Django REST Framework viewsets,…
- django-permissionedformsExtends Django's forms framework to conditionally show or hide form…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
See also dry-rest-permissions · djangorestframework-guardian · bridgekeeper · adrf · boolean.py · zope.security · djangorestframework-role-filters · auth · django-permissionedforms · conditional