All Projects → florimondmanca → Djangorestframework Api Key

florimondmanca / Djangorestframework Api Key

Licence: mit
🔐 API key permissions for Django REST Framework

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Djangorestframework Api Key

Django Rest Framework Docs
Document Web APIs made with Django Rest Framework
Stars: ✭ 607 (+109.31%)
Mutual labels:  web-api, django-rest-framework
Drf Access Policy
Declarative access policies/permissions modeled after AWS' IAM policies.
Stars: ✭ 200 (-31.03%)
Mutual labels:  django-rest-framework, permissions
RESO-WebAPI-Client-Python
RESO Web API Open Source Client written in Python.
Stars: ✭ 39 (-86.55%)
Mutual labels:  web-api
Presentations
Collection of presentations for advanced Python topics
Stars: ✭ 264 (-8.97%)
Mutual labels:  django-rest-framework
django rest framework swagger tutorial
django rest framework swagger tutorial
Stars: ✭ 20 (-93.1%)
Mutual labels:  django-rest-framework
indrz-be
Indoor mapping, routing system for orientation and wayfinding or facility management
Stars: ✭ 80 (-72.41%)
Mutual labels:  django-rest-framework
Django Hashid Field
Django Model Field that uses Hashids to obscure the value
Stars: ✭ 256 (-11.72%)
Mutual labels:  django-rest-framework
shopping-cart
A simple Shopping-cart built with React and Django REST Framework(DRF)
Stars: ✭ 41 (-85.86%)
Mutual labels:  django-rest-framework
Jsonld
JSON-LD processor for PHP
Stars: ✭ 280 (-3.45%)
Mutual labels:  web-api
random-stoic-quotes-api
A random stoic quotes Web API back-end (Server-side Web API). JSON API v1 and CORS compliant.
Stars: ✭ 16 (-94.48%)
Mutual labels:  web-api
Common
A set of common utils for consuming Web APIs with Angular
Stars: ✭ 259 (-10.69%)
Mutual labels:  web-api
twitter-api
Django Rest framework Real Time Twitter API . Fully functional twitter app with websocket api to notify and send chat in real time using django channels.
Stars: ✭ 30 (-89.66%)
Mutual labels:  django-rest-framework
rsnps
Wrapper to a number of SNP web APIs
Stars: ✭ 44 (-84.83%)
Mutual labels:  web-api
Django Elasticsearch Dsl Drf
Integrate Elasticsearch DSL with Django REST framework.
Stars: ✭ 258 (-11.03%)
Mutual labels:  django-rest-framework
rbac
RBAC - Simple, concurrent Role Based Access Control(GO)
Stars: ✭ 67 (-76.9%)
Mutual labels:  permissions
Openciviwiki
Building a Better Democracy for the Internet Age
Stars: ✭ 275 (-5.17%)
Mutual labels:  django-rest-framework
laravel-acl
Laravel ACL is a simple role, permission ACL for Laravel Framework.
Stars: ✭ 78 (-73.1%)
Mutual labels:  permissions
drf-psq
The simplest and most general way to manage action-based permissions, serializers, and querysets dependent on permission-based rules for the Django REST framework!
Stars: ✭ 24 (-91.72%)
Mutual labels:  django-rest-framework
laravel-inforce
A toolset to kickstart your application on top of Laravel Livewire, Laravel Jetstream and Spatie Permissions. LLoadout inforce is created using the TALL stack.
Stars: ✭ 12 (-95.86%)
Mutual labels:  permissions
Rplos
R client for the PLoS Journals API
Stars: ✭ 289 (-0.34%)
Mutual labels:  web-api

Django REST Framework API Key

API key permissions for the Django REST Framework.

python versions django versions drf versions

Introduction

Django REST Framework API Key is a library for allowing server-side clients to safely use your API. These clients are typically third-party backends and services (i.e. machines) which do not have a user account but still need to interact with your API in a secure way.

Features

  • ✌️ Simple to use: create, view and revoke API keys via the admin site, or use built-in helpers to create API keys programmatically.
  • 🔒 As secure as possible: API keys are treated with the same level of care than user passwords. They are hashed using the default password hasher before being stored in the database, and only visible at creation.
  • 🎨 Customizable: satisfy specific business requirements by building your own customized API key models, permission classes and admin panels.

Should I use API keys?

There are important security aspects you need to consider before switching to an API key access control scheme. We've listed some of these in Security caveats, including serving your API over HTTPS.

Besides, see Why and when to use API keys for hints on whether API keys can fit your use case.

API keys are ideal in the following situations:

  • Blocking anonymous traffic.
  • Implementing API key-based throttling. (Note that Django REST Framework already has may built-in utilities for this use case.)
  • Identifying usage patterns by logging request information along with the API key.

They can also present enough security for authorizing internal services, such as your API server and an internal frontend application.

Please note that this package is NOT meant for authentication. You should NOT use this package to identify individual users, either directly or indirectly.

If you need server-to-server authentication, you may want to consider OAuth instead. Libraries such as django-oauth-toolkit can help.

Quickstart

Install with pip:

pip install "djangorestframework-api-key==2.*"

Note: It is highly recommended to pin your dependency to the latest major version (as depicted above), as breaking changes may and will happen between major releases.

Add the app to your INSTALLED_APPS:

# settings.py

INSTALLED_APPS = [
  # ...
  "rest_framework",
  "rest_framework_api_key",
]

Run the included migrations:

python manage.py migrate

To learn how to configure permissions and manage API keys, head to the Documentation.

Changelog

See CHANGELOG.md.

Contributing

See CONTRIBUTING.md.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].