Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Django Model Field that supports AES encryption

Project Description
AES Field

Provides an AES field for Django that does AES encryption and decryption
using `m2secret-py3`_, a Python wrapper for OpenSSL.

.. _M2Crypto:


Like any other field::

from aesfield.field import AESField

class SomeModel(...):
key = AESField()


AESField takes the following parameters beyond a normal CharField:

* `aes_prefix`: the prefix to use on fields, defaults to `aes:`

* `aes_key`: the key to use in the lookup method to find a suitable key for
this field, defaults to `default`


* `AES_METHOD`: the module to look in for a key lookup method, if you want
something different from the default, `aesfield.default`

* `AES_KEYS`: used by the `aesfield.default` method. It's a dictionary of keys
to filenames. Those files must be able to be read by the Django process. It
must have a `default` key, unless you specify a specifc one in `aes_key`


If you add `aesfield` to `INSTALLED_APPS` you'll get one more command,
`generate_aes_keys`. This will generate a new file for each file mentioned in
the `AES_KEYS` dictionary. *But only if that file does not already exist*.
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_aesfield-1.1-py3-none-any.whl (8.2 kB) Copy SHA256 Checksum SHA256 3.6 Wheel Jun 19, 2017
django-aesfield-1.1.tar.gz (5.0 kB) Copy SHA256 Checksum SHA256 Source Jun 19, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting