drf-iam 0.0.1.post0__tar.gz → 0.0.3__tar.gz
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.
- drf_iam-0.0.3/PKG-INFO +100 -0
- drf_iam-0.0.3/README.md +71 -0
- drf_iam-0.0.3/drf_iam.egg-info/PKG-INFO +100 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/setup.py +5 -1
- drf_iam-0.0.1.post0/PKG-INFO +0 -35
- drf_iam-0.0.1.post0/README.md +0 -9
- drf_iam-0.0.1.post0/drf_iam.egg-info/PKG-INFO +0 -35
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/MANIFEST.in +0 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/drf_iam/__init__.py +0 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/drf_iam/admin.py +0 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/drf_iam/apps.py +0 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/drf_iam/migrations/0001_initial.py +0 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/drf_iam/migrations/__init__.py +0 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/drf_iam/models.py +0 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/drf_iam/permissions.py +0 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/drf_iam/tests.py +0 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/drf_iam.egg-info/SOURCES.txt +0 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/drf_iam.egg-info/dependency_links.txt +0 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/drf_iam.egg-info/requires.txt +0 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/drf_iam.egg-info/top_level.txt +0 -0
- {drf_iam-0.0.1.post0 → drf_iam-0.0.3}/setup.cfg +0 -0
drf_iam-0.0.3/PKG-INFO
ADDED
@@ -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
|
+
[](https://badge.fury.io/py/drf-iam)
|
33
|
+
[](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.
|
drf_iam-0.0.3/README.md
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# DRF-IAM (Django REST Framework - Identity and Access Management)
|
2
|
+
|
3
|
+
[](https://badge.fury.io/py/drf-iam)
|
4
|
+
[](https://drf-iam.readthedocs.io/en/latest/?badge=latest)
|
5
|
+
|
6
|
+
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.
|
7
|
+
|
8
|
+
## Features
|
9
|
+
|
10
|
+
- 🔒 Role-Based Access Control (RBAC)
|
11
|
+
- 🎯 Custom policy names for viewsets
|
12
|
+
- 🔄 Seamless integration with Django's User model
|
13
|
+
- ⚡ Easy to set up and configure
|
14
|
+
- 📚 Comprehensive documentation
|
15
|
+
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
```bash
|
19
|
+
pip install drf-iam
|
20
|
+
```
|
21
|
+
|
22
|
+
## Quick Start
|
23
|
+
|
24
|
+
1. Add `drf_iam` to your `INSTALLED_APPS` in `settings.py`:
|
25
|
+
|
26
|
+
```python
|
27
|
+
INSTALLED_APPS = [
|
28
|
+
...
|
29
|
+
'drf_iam',
|
30
|
+
]
|
31
|
+
```
|
32
|
+
|
33
|
+
2. Add the Role relationship to your User model:
|
34
|
+
|
35
|
+
```python
|
36
|
+
from django.contrib.auth.models import AbstractUser
|
37
|
+
from drf_iam.models import Role
|
38
|
+
|
39
|
+
class User(AbstractUser):
|
40
|
+
role = models.ForeignKey(Role, on_delete=models.SET_NULL, null=True)
|
41
|
+
```
|
42
|
+
|
43
|
+
3. Run migrations:
|
44
|
+
|
45
|
+
```bash
|
46
|
+
python manage.py makemigrations
|
47
|
+
python manage.py migrate
|
48
|
+
```
|
49
|
+
|
50
|
+
4. Use in your viewsets:
|
51
|
+
|
52
|
+
```python
|
53
|
+
from rest_framework import viewsets
|
54
|
+
from drf_iam.permissions import IAMPermission
|
55
|
+
|
56
|
+
class UserViewSet(viewsets.ModelViewSet):
|
57
|
+
permission_classes = [IAMPermission]
|
58
|
+
iam_policy_name = "users" # Optional: Custom policy name for this viewset
|
59
|
+
```
|
60
|
+
|
61
|
+
## Documentation
|
62
|
+
|
63
|
+
For detailed documentation, visit [https://drf-iam.readthedocs.io/](https://drf-iam.readthedocs.io/)
|
64
|
+
|
65
|
+
## Contributing
|
66
|
+
|
67
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
68
|
+
|
69
|
+
## License
|
70
|
+
|
71
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
@@ -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
|
+
[](https://badge.fury.io/py/drf-iam)
|
33
|
+
[](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.
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='drf-iam',
|
5
|
-
version='0.0.
|
5
|
+
version='0.0.3',
|
6
6
|
packages=find_packages(), # Automatically finds all sub-packages
|
7
7
|
include_package_data=True, # Include non-Python files from MANIFEST.in
|
8
8
|
install_requires=[
|
@@ -15,6 +15,10 @@ setup(
|
|
15
15
|
long_description=open('README.md').read(),
|
16
16
|
long_description_content_type='text/markdown', # Important if using Markdown
|
17
17
|
url='https://github.com/tushar1328/drf-iam.git', # Optional but helpful
|
18
|
+
project_urls={
|
19
|
+
'Documentation': 'https://drf-iam.readthedocs.io/en/latest/installation.html',
|
20
|
+
'Source': 'https://github.com/tushar1328/drf-iam.git',
|
21
|
+
},
|
18
22
|
classifiers=[
|
19
23
|
'Framework :: Django',
|
20
24
|
'Framework :: Django :: 3.2',
|
drf_iam-0.0.1.post0/PKG-INFO
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.2
|
2
|
-
Name: drf-iam
|
3
|
-
Version: 0.0.1.post0
|
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
|
-
Classifier: Framework :: Django
|
9
|
-
Classifier: Framework :: Django :: 3.2
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
12
|
-
Classifier: Operating System :: OS Independent
|
13
|
-
Requires-Python: >=3.6
|
14
|
-
Description-Content-Type: text/markdown
|
15
|
-
Requires-Dist: Django>=3.2
|
16
|
-
Requires-Dist: djangorestframework>=3.12
|
17
|
-
Dynamic: author
|
18
|
-
Dynamic: author-email
|
19
|
-
Dynamic: classifier
|
20
|
-
Dynamic: description
|
21
|
-
Dynamic: description-content-type
|
22
|
-
Dynamic: home-page
|
23
|
-
Dynamic: requires-dist
|
24
|
-
Dynamic: requires-python
|
25
|
-
Dynamic: summary
|
26
|
-
|
27
|
-
## Rest Framework IAM
|
28
|
-
|
29
|
-
A simple Django application for Role Based Access Control (RBAC) using Django Rest Framework
|
30
|
-
|
31
|
-
## Installation
|
32
|
-
|
33
|
-
```bash
|
34
|
-
pip install drf-iam
|
35
|
-
```
|
drf_iam-0.0.1.post0/README.md
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.2
|
2
|
-
Name: drf-iam
|
3
|
-
Version: 0.0.1.post0
|
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
|
-
Classifier: Framework :: Django
|
9
|
-
Classifier: Framework :: Django :: 3.2
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
12
|
-
Classifier: Operating System :: OS Independent
|
13
|
-
Requires-Python: >=3.6
|
14
|
-
Description-Content-Type: text/markdown
|
15
|
-
Requires-Dist: Django>=3.2
|
16
|
-
Requires-Dist: djangorestframework>=3.12
|
17
|
-
Dynamic: author
|
18
|
-
Dynamic: author-email
|
19
|
-
Dynamic: classifier
|
20
|
-
Dynamic: description
|
21
|
-
Dynamic: description-content-type
|
22
|
-
Dynamic: home-page
|
23
|
-
Dynamic: requires-dist
|
24
|
-
Dynamic: requires-python
|
25
|
-
Dynamic: summary
|
26
|
-
|
27
|
-
## Rest Framework IAM
|
28
|
-
|
29
|
-
A simple Django application for Role Based Access Control (RBAC) using Django Rest Framework
|
30
|
-
|
31
|
-
## Installation
|
32
|
-
|
33
|
-
```bash
|
34
|
-
pip install drf-iam
|
35
|
-
```
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|