Giter VIP home page Giter VIP logo

django-api-key's Introduction

DRF API Key

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.

django-api-key's People

Contributors

dryice avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.