Skip to main content

Is your password safe?

Project description

Is your password safe? Safe will check the password strength for you.

https://travis-ci.org/lepture/safe.png?branch=master

How it works

Safe will check if the password has a simple pattern, for instance:

  1. password is in the order on your QWERT keyboards.

  2. password is simple alphabet step by step, such as: abcd, 1357

Safe will check if the password is a common used password. Many thanks to Mark Burnett for the great work on 10000 Top Passwords.

Safe will check if the password has mixed number, alphabet, marks.

Installation

Install Safe with pip:

$ pip install Safe

If pip is not available, try easy_install:

$ easy_install Safe

Usage

It’s very simple to check the strength of a password:

>>> import safe
>>> safe.check(1)
terrible
>>> safe.check('password')
simpile
>>> safe.check('is.safe')
medium
>>> safe.check('x*V-92Ba')
strong
>>> strength = safe.check('x*V-92Ba')
>>> bool(strength)
True
>>> repr(strength)
'strong'
>>> str(strength)
'password is perfect'
>>> strength.valid
True
>>> strength.strength
'strong'
>>> strength.message
'good password'

Environ Variables

  1. PYTHON_SAFE_WORDS_CACHE: cache words in this file, default is a tempfile

  2. PYTHON_SAFE_WORDS_FILE: words vocabulary file, default is the 10k top passwords

Other Implementations

  1. JavaScript: lepture/safe.js

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

Safe-0.3.tar.gz (56.6 kB view details)

Uploaded Source

File details

Details for the file Safe-0.3.tar.gz.

File metadata

  • Download URL: Safe-0.3.tar.gz
  • Upload date:
  • Size: 56.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Safe-0.3.tar.gz
Algorithm Hash digest
SHA256 55e0ca946518a3de4c085d6d4055ae81f952ca3d55fff6d76ce8c960cd43a497
MD5 a25aec5f9413aa0f9d6d13b1d22c36f3
BLAKE2b-256 6a49ced6f9e30fe8969693a46379a4efccaa778f4701f063ea81b128fc02d261

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