fernet
A simple python fernet implementation
What it is and what it does
Fernet is a pure Python implementation of the Fernet symmetric encryption standard, designed for situations where you cannot or will not use compiled C-based cryptographic modules. It provides token-based authenticated encryption—meaning it both encrypts data and verifies its authenticity in a single operation.
The package is explicitly positioned as a fallback or reference implementation. The maintainer's own documentation states you should only use this module when you cannot use the cryptography library. The implementation has no runtime dependencies and installs from source only, which creates installation friction. More importantly, the project is abandoned: the last commit was 2018-12-31 and the latest release dates to 2016-09-18, with no active maintenance.
Use it for:
- Educational reference: studying how Fernet encryption works or implementing the spec in another language.
- Constrained environments: systems where C extensions cannot be compiled and the cryptography library is unavailable.
- Legacy compatibility: maintaining existing code that already depends on this specific package.
- Pure-Python-only deployments: scenarios where compiled dependencies are explicitly forbidden by policy.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pure Python implementation of the Fernet symmetric encryption specification, providing token-based authenticated encryption without compiled C dependencies.
No, not for new projects. The maintainer explicitly recommends using the cryptography library instead. This package is abandoned (last release 2016-09-18, last commit 2018-12-31), making it unsuitable for production cryptography work. Install only if you are maintaining legacy code that already depends on it, and consider migrating to cryptography as soon as feasible.
Install
fernet on PyPI
pip
pip install fernetuv
uv add fernetpoetry
poetry add fernetInstalling fernet
Before you install
High install friction due to source distribution only. More critically, the package is abandoned—last commit was 2018-12-31 and no releases since 2016-09-18. Maintenance status is a serious concern for a cryptographic library.
License in practice
MIT license is permissive and poses no restrictions on use, modification, or distribution.
Quickstart
pip install fernet
from fernet import Fernet
key = Fernet.generate_key()
cipher = Fernet(key)
token = cipher.encrypt(b'secret message')
plaintext = cipher.decrypt(token)
The package is abandoned and unmaintained since 2016. For production use, the maintainer explicitly recommends using the cryptography library instead.
Verify before relying
- Whether this implementation has been audited or validated against the Fernet specification since its last release in 2016-09-18.
- Whether any security issues have been discovered in the Fernet specification itself that would affect this implementation.
- Current compatibility with modern Python versions beyond 3.5, given the classifier only lists up to Python 3.5.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,617 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 240,878/month — #8,894 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fernet-1.0.1.tar.gz
Tags
More Cryptography packages
Certifi provides Mozilla's curated collection…
copyleft · top 100 on PyPI
cryptographycryptography provides cryptographic recipes and…
permissive · top 100 on PyPI
rsaPure-Python RSA encryption, decryption,…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
azure-identityProvides Microsoft Entra ID token-based…
unclear · top 1,000 on PyPI
PyNaClPyNaCl provides Python bindings to libsodium…
permissive · top 1,000 on PyPI
django-fernet-fields-v2Provides Fernet symmetric encryption for Django…
permissive · top 5,000 on PyPI
django-fernet-encrypted-fieldsProvides Django model fields that encrypt data…
unclear · top 15,000 on PyPI
djfernetProvides Fernet symmetric encryption for Django…
permissive · top 15,000 on PyPI
spake2Implements SPAKE2, a password-authenticated key…
permissive · top 15,000 on PyPI
django-cryptographyWraps Python's cryptography library to add…
permissive · top 15,000 on PyPI
snitunSniTun is an SNI proxy with TCP multiplexer…
copyleft · top 15,000 on PyPI
django-cryptography-django5Encrypts and decrypts data in Django models…
permissive · top 15,000 on PyPI
py3rijndaelpy3rijndael provides a pure-Python…
permissive · top 15,000 on PyPI
libnaclPython bindings to libsodium's NaCl…
permissive · top 15,000 on PyPI