Giter Club home page Giter Club logo

django-api-bouncer's Introduction

API Bouncer

build-status-image coverage-image pypi-version

API Bouncer is a simple Django app to provide an API Gateway for micro-services.

It's heavily inspired by Kong

Requirements

  • Python (3.5, 3.6)
  • Django (1.10, 1.11)
  • Django Rest Framework (3.6)
  • PostgreSQL (9.4+)
  • psycopg2 (2.5.4+)

Quick start

Add "api_bouncer" to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        # all other Django apss you have...
        'api_bouncer',
    ]

Activate the key-auth plugin by adding the middleware on your settings.py:

    MIDDLEWARE = [
        # all other middleware...
        'api_bouncer.middleware.bouncer.BouncerMiddleware',  # required
        'api_bouncer.middleware.key_auth.KeyAuthMiddleware',
    ]

Important! Note that you need to include BouncerMiddleware before the rest of plugin middleware. Otherwise it will not work.

Include the api_bouncer URLconf in your project urls.py like this:

    url(r'^', include('api_bouncer.urls', namespace='api_bouncer')),

Run python manage.py migrate to create the api_bouncer models.

Available plugins

Authenticacion

  • Key authentication: Add key authentication to your API

Security

  • ACL: Control which consumers have access to your API
  • IP restriction: Blacklist or whilelist IPs that can access your API

Traffic Control

  • Request termination: Terminate all request with a specific response.

Documentation

Documentation can be found in the docs directory or here

django-api-bouncer's People

Contributors

menecio 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.