drf-iam 0.0.2__py3-none-any.whl → 0.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.4
2
+ Name: drf-iam
3
+ Version: 0.0.3
4
+ Summary: IAM-style roles and permissions for Django Rest Framework
5
+ Home-page: https://github.com/tushar1328/drf-iam.git
6
+ Author: Tushar Patel
7
+ Author-email: tushar.patel@gmail.com
8
+ Project-URL: Documentation, https://drf-iam.readthedocs.io/en/latest/installation.html
9
+ Project-URL: Source, https://github.com/tushar1328/drf-iam.git
10
+ Classifier: Framework :: Django
11
+ Classifier: Framework :: Django :: 3.2
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Requires-Python: >=3.6
16
+ Description-Content-Type: text/markdown
17
+ Requires-Dist: Django>=3.2
18
+ Requires-Dist: djangorestframework>=3.12
19
+ Dynamic: author
20
+ Dynamic: author-email
21
+ Dynamic: classifier
22
+ Dynamic: description
23
+ Dynamic: description-content-type
24
+ Dynamic: home-page
25
+ Dynamic: project-url
26
+ Dynamic: requires-dist
27
+ Dynamic: requires-python
28
+ Dynamic: summary
29
+
30
+ # DRF-IAM (Django REST Framework - Identity and Access Management)
31
+
32
+ [![PyPI version](https://badge.fury.io/py/drf-iam.svg)](https://badge.fury.io/py/drf-iam)
33
+ [![Documentation Status](https://readthedocs.org/projects/drf-iam/badge/?version=latest)](https://drf-iam.readthedocs.io/en/latest/?badge=latest)
34
+
35
+ A powerful Django application that provides Role-Based Access Control (RBAC) for Django REST Framework applications. Easily manage permissions and roles across your API endpoints.
36
+
37
+ ## Features
38
+
39
+ - 🔒 Role-Based Access Control (RBAC)
40
+ - 🎯 Custom policy names for viewsets
41
+ - 🔄 Seamless integration with Django's User model
42
+ - ⚡ Easy to set up and configure
43
+ - 📚 Comprehensive documentation
44
+
45
+ ## Installation
46
+
47
+ ```bash
48
+ pip install drf-iam
49
+ ```
50
+
51
+ ## Quick Start
52
+
53
+ 1. Add `drf_iam` to your `INSTALLED_APPS` in `settings.py`:
54
+
55
+ ```python
56
+ INSTALLED_APPS = [
57
+ ...
58
+ 'drf_iam',
59
+ ]
60
+ ```
61
+
62
+ 2. Add the Role relationship to your User model:
63
+
64
+ ```python
65
+ from django.contrib.auth.models import AbstractUser
66
+ from drf_iam.models import Role
67
+
68
+ class User(AbstractUser):
69
+ role = models.ForeignKey(Role, on_delete=models.SET_NULL, null=True)
70
+ ```
71
+
72
+ 3. Run migrations:
73
+
74
+ ```bash
75
+ python manage.py makemigrations
76
+ python manage.py migrate
77
+ ```
78
+
79
+ 4. Use in your viewsets:
80
+
81
+ ```python
82
+ from rest_framework import viewsets
83
+ from drf_iam.permissions import IAMPermission
84
+
85
+ class UserViewSet(viewsets.ModelViewSet):
86
+ permission_classes = [IAMPermission]
87
+ iam_policy_name = "users" # Optional: Custom policy name for this viewset
88
+ ```
89
+
90
+ ## Documentation
91
+
92
+ For detailed documentation, visit [https://drf-iam.readthedocs.io/](https://drf-iam.readthedocs.io/)
93
+
94
+ ## Contributing
95
+
96
+ Contributions are welcome! Please feel free to submit a Pull Request.
97
+
98
+ ## License
99
+
100
+ This project is licensed under the MIT License - see the LICENSE file for details.
@@ -6,7 +6,7 @@ drf_iam/permissions.py,sha256=kUhB7V48sb4v3uZI2lWv40hvI85nE61rL-amh6OY8mg,958
6
6
  drf_iam/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
7
7
  drf_iam/migrations/0001_initial.py,sha256=y_4jXnr7gjU4UXxVrgVrStTSFu3h1ZrmjEZDL4FtZa4,3086
8
8
  drf_iam/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- drf_iam-0.0.2.dist-info/METADATA,sha256=WLu6QTApO6YfbOO9PYGgzNRyyd3W-JLMS5w_zkOXNJo,1112
10
- drf_iam-0.0.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
11
- drf_iam-0.0.2.dist-info/top_level.txt,sha256=daz6AaQ9e_cfCjLk2aRoLb_PCOoFofYUX4DU85VwHSM,8
12
- drf_iam-0.0.2.dist-info/RECORD,,
9
+ drf_iam-0.0.3.dist-info/METADATA,sha256=TX_Bn6q0VhHzdnDd-LgsjfbyhZe4T1cZ7zLkUWpeSyc,2763
10
+ drf_iam-0.0.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
11
+ drf_iam-0.0.3.dist-info/top_level.txt,sha256=daz6AaQ9e_cfCjLk2aRoLb_PCOoFofYUX4DU85VwHSM,8
12
+ drf_iam-0.0.3.dist-info/RECORD,,
@@ -1,38 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: drf-iam
3
- Version: 0.0.2
4
- Summary: IAM-style roles and permissions for Django Rest Framework
5
- Home-page: https://github.com/tushar1328/drf-iam.git
6
- Author: Tushar Patel
7
- Author-email: tushar.patel@gmail.com
8
- Project-URL: Documentation, https://drf-iam.readthedocs.io/en/latest/installation.html
9
- Project-URL: Source, https://github.com/tushar1328/drf-iam.git
10
- Classifier: Framework :: Django
11
- Classifier: Framework :: Django :: 3.2
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: License :: OSI Approved :: MIT License
14
- Classifier: Operating System :: OS Independent
15
- Requires-Python: >=3.6
16
- Description-Content-Type: text/markdown
17
- Requires-Dist: Django>=3.2
18
- Requires-Dist: djangorestframework>=3.12
19
- Dynamic: author
20
- Dynamic: author-email
21
- Dynamic: classifier
22
- Dynamic: description
23
- Dynamic: description-content-type
24
- Dynamic: home-page
25
- Dynamic: project-url
26
- Dynamic: requires-dist
27
- Dynamic: requires-python
28
- Dynamic: summary
29
-
30
- ## Rest Framework IAM
31
-
32
- A simple Django application for Role Based Access Control (RBAC) using Django Rest Framework
33
-
34
- ## Installation
35
-
36
- ```bash
37
- pip install drf-iam
38
- ```