Skip to main content

Api data decryption and encryption support for Django REST Framework

Project description

django-rest-vault

Api data decryption and encryption support for Django REST Framework

Requirements

  • Python (3.6+)
  • Django (2.2.16+)
  • Django REST Framework (3.10.3+)

Installation

Install using pip

pip install django-rest-vault

Usage

Add rest_framework_vault to INSTALLED_APPS and REST_FRAMEWORK

INSTALLED_APPS = (
  ...
  'rest_framework',       # Django REST Framework
  'rest_framework_vault', # Django REST Vault
  ...
)

REST_FRAMEWORK = {
  'DEFAULT_PARSER_CLASSES': (
    'rest_framework.parsers.JSONParser',
    'rest_framework_vault.parsers.VaultParser',
  ),
  'DEFAULT_RENDERER_CLASSES': (
    'rest_framework.renderers.JSONRenderer',
    'rest_framework_vault.renderers.VaultRenderer',
  ),
}

Also add settings for REST_VAULT to your project settings.py

REST_VAULT = {
  'SECRET_KEY': b'*Thirty-two byte (256 bits) key*',
  'HTTP_CONTENT_TYPE': 'application/vault',
  'HTTP_ACCEPT': 'application/vault',
  'HTTP_FORMAT': 'vault',
  'USE_TOKEN_AS_KEY': True,
}

Project details


Download files

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

Source Distribution

django-rest-vault-0.0.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

django_rest_vault-0.0.1-py2.py3-none-any.whl (5.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-rest-vault-0.0.1.tar.gz.

File metadata

  • Download URL: django-rest-vault-0.0.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for django-rest-vault-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5541b4a0e14b33f8d10c1e74ce1efd7d8381b17184ed4e7624db5ed84ddcbd4c
MD5 cf2c6d3d324ffcfd347c086e84525600
BLAKE2b-256 d7184cf9c13d9d70669d15e9d9a1acd0ce511d4c04cd60a9ad46e0f29595923d

See more details on using hashes here.

File details

Details for the file django_rest_vault-0.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_rest_vault-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c51197eb3410b28c044c49755fe1639dc3d8496e470665b6e0317d86aba2854f
MD5 898e32f6406acf00c6a26446595d8247
BLAKE2b-256 f2f61ff2c6ef021616c55fd112a918ae821d0b4ca1382becf52f6b6c503bd10e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page