Skip to main content

A Django api permission manager that helps you custom api url in regular expression and control access.

Project description

Django-API-Permission

1. Intro

A Django api permission manager that helps you custom api url in regular expression and control access.

2. Quick Start

2.1 Install

pip install django-api-permission

2.2 add to INSTALLED_APPS and MIDDLEWARE

INSTALLED_APPS = [
    ...
    'api_permission',
    ...
]

MIDDLEWARE = [
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    ...
    'api_permission.middleware.APIPermCheckMiddleware',
]

2.3 migrate

./manage.py migrate api_permission

2.4 API_PREFIX

You can custom API_PREFIX in settings.py to only check the API starts with API_PREFIX, default is /api/.

3. Demo

3.1 list

3.2 edit

3.3 result

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-api-permission, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size django_api_permission-0.0.4-py3-none-any.whl (7.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size django-api-permission-0.0.4.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page