skillfed

fernet

A simple python fernet implementation

fernet v1.0.1 240.9K downloads/30d#8,894 on PyPI16
Permissive license MIT Abandoned released

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 fernet

uv

uv add fernet

poetry

poetry add fernet

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.4Programming Language :: Python :: 3.5Topic :: Security :: Cryptography

Tags

fernet encryption pythonsymmetric encryption pure pythonauthenticated encryption no c extensionfernet token cryptographypython-only encryption library
abandonedreference-implementationpure-python

More Cryptography packages