• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

Safe.egg-info/H03-May-2022-9977

safe/H08-Nov-2015-10,23410,163

LICENSEH A D22-Jul-20141.5 KiB2823

MANIFEST.inH A D23-Jul-201458 43

PKG-INFOH A D08-Nov-20153.2 KiB9977

README.rstH A D28-Jul-20141.6 KiB7251

setup.cfgH A D08-Nov-201559 64

setup.pyH A D22-Jul-20141.6 KiB6250

README.rst

1Safe
2====
3
4Is your password safe? **Safe** will check the password strength for you.
5
6.. image:: https://travis-ci.org/lepture/safe.png?branch=master
7   :target: https://travis-ci.org/lepture/safe
8
9How it works
10------------
11
12**Safe** will check if the password has a simple pattern, for instance:
13
141. password is in the order on your QWERT keyboards.
152. password is simple alphabet step by step, such as: abcd, 1357
16
17**Safe** will check if the password is a common used password.
18Many thanks to Mark Burnett for the great work on `10000 Top Passwords <https://xato.net/passwords/more-top-worst-passwords/>`_.
19
20**Safe** will check if the password has mixed number, alphabet, marks.
21
22Installation
23------------
24
25Install Safe with pip::
26
27    $ pip install Safe
28
29If pip is not available, try easy_install::
30
31    $ easy_install Safe
32
33Usage
34-----
35
36It's very simple to check the strength of a password::
37
38    >>> import safe
39    >>> safe.check(1)
40    terrible
41    >>> safe.check('password')
42    simpile
43    >>> safe.check('is.safe')
44    medium
45    >>> safe.check('x*V-92Ba')
46    strong
47    >>> strength = safe.check('x*V-92Ba')
48    >>> bool(strength)
49    True
50    >>> repr(strength)
51    'strong'
52    >>> str(strength)
53    'password is perfect'
54    >>> strength.valid
55    True
56    >>> strength.strength
57    'strong'
58    >>> strength.message
59    'good password'
60
61
62Environ Variables
63-----------------
64
651. **PYTHON_SAFE_WORDS_CACHE**: cache words in this file, default is a tempfile
662. **PYTHON_SAFE_WORDS_FILE**: words vocabulary file, default is the 10k top passwords
67
68Other Implementations
69---------------------
70
711. **JavaScript**: `lepture/safe.js <https://github.com/lepture/safe.js>`_
72