Per URL api-key control for Django
Project description
Per URL api-key control for Django
Installation
To get the latest stable release from PyPi
pip install django-api-key
To get the latest commit from GitHub
pip install -e git+git://github.com/dryice/django-api-key.git#egg=django_api_key
Add django_api_key to your INSTALLED_APPS
INSTALLED_APPS = (
...,
'django_api_key',
)
Migrate your database
./manage.py migrate django_api_key
Add the django_api_key URLs to your MIDDLEWARE
MIDDLEWARE = [
...,
'django_api_key.middleware.APIKeyMiddleware',
]
(Optional) adjust the URLs that you don’t want api_key check. Default is:
IGNORE_API_KEY_CHECK_FOR = ["/admin/.*", "/docs/.*"]
Visit /admin/django_api_key/ipaccess/ and add rules accordingly
Usage
TODO:
Contribute
If you want to contribute to this project, please perform the following steps
# Fork this repository
# Clone your fork
mkvirtualenv -p python3.7 django-api-key
make develop
git co -b feature_branch master
# Implement your feature and tests
git add . && git commit
git push -u origin feature_branch
# Send us a pull request for your feature branch
In order to run the tests, simply execute tox. This will install two new environments (for Django 2.0 and Django 2.1) and run the tests against both environments.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-api-key-0.1.0.tar.gz
.
File metadata
- Download URL: django-api-key-0.1.0.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e735ae2df09a4abae13854f3134634b8a8294ae4737e9a246b7253ea342fb34 |
|
MD5 | f2f14388b7721f5870e7c0619ef72bf4 |
|
BLAKE2b-256 | d995aa82b1fd54f16ec54c983300aea2ad450d2e487ec5f7f7b0e754f0afd70e |