Skip to main content

djangorestframework-apicontrol

This is an App intended to control Clients Apps access over REST APIs.

Notice

Please be carefull with the use of this package, and remember to backup your database before apply each migration.

Permission Usage (APIKey)

you only has to import the permission and use it in your rest_framework views, or in your settings.py file, as you prefer. e.g:

"""Contact views."""
from rest_framework import viewsets
from rest_framework_apicontrol.permissions import HasApiKeyPermission
from .models import (
    ContactInfo
)
from .serializers import (
    ContactInfoSerializer
)


class ContactInfoViewSet(viewsets.ModelViewSet):
    queryset = ContactInfo.objects.all()
    serializer_class = ContactInfoSerializer
    permission_classes = [HasApiKeyPermission]
    authentication_classes = []

All the calls to this endpoint MUST HAVE a header called Api-Key with the value of an App(App model in Django admin site)

Models

This app comes with several models & mixins which provide useful common fields & functions, the models it provides are the following:

models diagram

To add those models to your app the only you need to do is add rest_framework_apicontrol to your project INSTALLED_APPS setting & then migrate your app.

INSTALLED_APPS = [
    # Django default modules
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # Security & multi-app management
    'rest_framework_apicontrol',
    # Your project apps
    '...',
]

Notice: This project's models needs PostgreSQL as database because the use of JSONField in some of it's model fields.

Donate

If this project is useful for you, please donate some dollars to help me improve this & others projects.

My Paypal - http://paypal.me/mcuetodeveloper

Release files for rest-framework-apicontrol 0.8.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rest-framework-apicontrol 0.8.4
File Size Uploaded
rest-framework-apicontrol-0.8.4.tar.gz 22.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rest-framework-apicontrol 0.8.4
File Interpreter ABI Platform
rest_framework_apicontrol-0.8.4-py3-none-any.whl Python 3 none any Details

Total release size: 53.2 kB

Release files / rest-framework-apicontrol-0.8.4.tar.gz

Download URL rest-framework-apicontrol-0.8.4.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
261e3f5e56b4c3304b7cc053405486333c7036a7a7daed634838df7443881f8c
BLAKE2b-256 checksum
How to use checksums
1122d8ad0997e1f09a21c54e58854f6baa0033ed761ef74b7067116fe6d91c5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.6 Linux/5.8.0-7630-generic

Release files / rest_framework_apicontrol-0.8.4-py3-none-any.whl

Download URL rest_framework_apicontrol-0.8.4-py3-none-any.whl
Size 30.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9a1fa6ba3b3db5366ff2c971773ce57a0fdca939e88b5eb05fa012739278c09
BLAKE2b-256 checksum
How to use checksums
5854857751602a82ba3a05964ee8224eea70260368cf0327ec37429c92430bd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.6 Linux/5.8.0-7630-generic

Release history Release notifications | RSS feed

This release

0.8.4 This release

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

1 release file

0.7.7

1 release file

0.7.6

1 release file

0.7.5

1 release file

0.7.4

1 release file

0.7.3

1 release file

0.7.2

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.3

1 release file

0.6.0

1 release file

0.5.8

1 release file

0.5.7

1 release file

0.5.6

1 release file

0.5.5

1 release file

0.5.0

1 release file

0.4.5

1 release file

0.4.0

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page