# drf-permissions
## Installation
```pip
pip install drf-custom-permissions
```
## Usage
### APIView IsNotAuthenticated permission
```python
# views.py
from rest_framework.views import APIView
from drf_custom_permissions import IsNotAuthenticated
class ExampleIsNotAuthenticatedAPIVIew(APIView):
permission_classes = (IsNotAuthenticated,)
...
```
### APIView with HasGroupPermission
```python
# views.py
from rest_framework.views import APIView
from drf_custom_permissions import HasGroupPermission
class ExampleIsNotAuthenticatedAPIVIew(APIView):
permission_classes = (HasGroupPermission,)
permission_groups = ('Designers', 'Developers',)
...
```
Raw data
{
"_id": null,
"home_page": "https://github.com/kovalevme/drf-permissions",
"name": "drf-custom-permissions",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "drf,django,Django,django rest framework,drf-permission,permissions,python",
"author": "kovalevme",
"author_email": "kovalevme14@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/5f/b6/d21da0ef7309507029d12e42db2f21b7711a2c0f73b2f55927c3097aa5d8/drf_custom_permissions-0.1.2.tar.gz",
"platform": null,
"description": "# drf-permissions\n\n## Installation\n\n```pip\npip install drf-custom-permissions\n```\n\n## Usage\n\n### APIView IsNotAuthenticated permission\n\n```python\n# views.py\n\nfrom rest_framework.views import APIView\nfrom drf_custom_permissions import IsNotAuthenticated\n\nclass ExampleIsNotAuthenticatedAPIVIew(APIView):\n permission_classes = (IsNotAuthenticated,)\n ...\n```\n\n### APIView with HasGroupPermission\n\n```python\n# views.py\n\nfrom rest_framework.views import APIView\nfrom drf_custom_permissions import HasGroupPermission\n\nclass ExampleIsNotAuthenticatedAPIVIew(APIView):\n permission_classes = (HasGroupPermission,)\n permission_groups = ('Designers', 'Developers',)\n ...\n```",
"bugtrack_url": null,
"license": "MIT",
"summary": "Django Rest Framework custom permissions classes",
"version": "0.1.2",
"project_urls": {
"Homepage": "https://github.com/kovalevme/drf-permissions"
},
"split_keywords": [
"drf",
"django",
"django",
"django rest framework",
"drf-permission",
"permissions",
"python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1970f5f63ee027a8d12d12a4cbea1371c8bd5f1a6d008e8e10548cb76319583c",
"md5": "d5fd1e488b27afd07ee58110461e1f4c",
"sha256": "9193d0157e5ffb1808dd64767d74fd0b65e1267357055a8e7c8c3bf3fec9510b"
},
"downloads": -1,
"filename": "drf_custom_permissions-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d5fd1e488b27afd07ee58110461e1f4c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 3036,
"upload_time": "2023-12-03T11:48:59",
"upload_time_iso_8601": "2023-12-03T11:48:59.090990Z",
"url": "https://files.pythonhosted.org/packages/19/70/f5f63ee027a8d12d12a4cbea1371c8bd5f1a6d008e8e10548cb76319583c/drf_custom_permissions-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5fb6d21da0ef7309507029d12e42db2f21b7711a2c0f73b2f55927c3097aa5d8",
"md5": "347c22e9f10a56565a275888b3a90385",
"sha256": "6fa19496a9841f134d9c60017a960b9e79b37ef9a63c644914add384fb7a69a1"
},
"downloads": -1,
"filename": "drf_custom_permissions-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "347c22e9f10a56565a275888b3a90385",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 2196,
"upload_time": "2023-12-03T11:49:00",
"upload_time_iso_8601": "2023-12-03T11:49:00.992900Z",
"url": "https://files.pythonhosted.org/packages/5f/b6/d21da0ef7309507029d12e42db2f21b7711a2c0f73b2f55927c3097aa5d8/drf_custom_permissions-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-03 11:49:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kovalevme",
"github_project": "drf-permissions",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "drf-custom-permissions"
}