{"id":13593912,"url":"https://github.com/dwolfhub/zxcvbn-python","last_synced_at":"2025-05-14T03:10:25.129Z","repository":{"id":40625897,"uuid":"74055016","full_name":"dwolfhub/zxcvbn-python","owner":"dwolfhub","description":"Python implementation of Dropbox's realistic password strength estimator","archived":false,"fork":false,"pushed_at":"2025-02-19T19:04:17.000Z","size":9226,"stargazers_count":665,"open_issues_count":0,"forks_count":72,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-13T04:55:19.351Z","etag":null,"topics":["password","python-2","python-3","security","zxcvbn"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dwolfhub.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-17T18:22:02.000Z","updated_at":"2025-04-04T08:02:23.000Z","dependencies_parsed_at":"2025-03-15T22:02:05.049Z","dependency_job_id":"81b2cd5e-4349-47d9-8f97-8c10766e9a25","html_url":"https://github.com/dwolfhub/zxcvbn-python","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fzxcvbn-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fzxcvbn-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fzxcvbn-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fzxcvbn-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwolfhub","download_url":"https://codeload.github.com/dwolfhub/zxcvbn-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059511,"owners_count":22007769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["password","python-2","python-3","security","zxcvbn"],"created_at":"2024-08-01T16:01:26.218Z","updated_at":"2025-05-14T03:10:20.118Z","avatar_url":"https://github.com/dwolfhub.png","language":"Python","readme":"|Build Status|\n\nzxcvbn\n======\n\nA realistic password strength estimator.\n\nThis is a Python implementation of the library created by the team at Dropbox.\nThe original library, written for JavaScript, can be found\n`here \u003chttps://github.com/dropbox/zxcvbn\u003e`__.\n\nWhile there may be other Python ports available, this one is the most up\nto date and is recommended by the original developers of zxcvbn at this\ntime.\n\n\nFeatures\n--------\n- **Tested in Python versions 3.8-3.13**\n- Accepts user data to be added to the dictionaries that are tested against (name, birthdate, etc)\n- Gives a score to the password, from 0 (terrible) to 4 (great)\n- Provides feedback on the password and ways to improve it\n- Returns time estimates on how long it would take to guess the password in different situations\n\nInstallation\n------------\n\nInstall the package using pip: ``pip install zxcvbn``\n\nUsage\n-----\n\nPass a password as the first parameter, and a list of user-provided\ninputs as the ``user_inputs`` parameter (optional).\n\n.. code:: python\n\n    from zxcvbn import zxcvbn\n\n    results = zxcvbn('JohnSmith123', user_inputs=['John', 'Smith'])\n\n    print(results)\n\nOutput:\n\n::\n\n    {\n        'password': 'JohnSmith123',\n        'score': 2,\n        'guesses': 2567800,\n        'guesses_log10': 6.409561194521849,\n        'calc_time': datetime.timedelta(0, 0, 5204)\n        'feedback': {\n            'warning': '',\n            'suggestions': [\n                'Add another word or two. Uncommon words are better.',\n                \"Capitalization doesn't help very much\"\n            ]\n        },\n        'crack_times_display': {\n            'offline_fast_hashing_1e10_per_second': 'less than a second'\n            'offline_slow_hashing_1e4_per_second': '4 minutes',\n            'online_no_throttling_10_per_second': '3 days',\n            'online_throttling_100_per_hour': '3 years',\n        },\n        'crack_times_seconds': {\n            'offline_fast_hashing_1e10_per_second': 0.00025678,\n            'offline_slow_hashing_1e4_per_second': 256.78\n            'online_no_throttling_10_per_second': 256780.0,\n            'online_throttling_100_per_hour': 92440800.0,\n        },\n        'sequence': [{\n            'matched_word': 'john',\n            'rank': 2,\n            'pattern': 'dictionary',\n            'reversed': False,\n            'token': 'John',\n            'l33t': False,\n            'uppercase_variations': 2,\n            'i': 0,\n            'guesses': 50,\n            'l33t_variations': 1,\n            'dictionary_name': 'male_names',\n            'base_guesses': 2,\n            'guesses_log10': 1.6989700043360185,\n            'j': 3\n        }, {\n            'matched_word': 'smith123',\n            'rank': 12789,\n            'pattern': 'dictionary',\n            'reversed': False,\n            'token': 'Smith123',\n            'l33t': False,\n            'uppercase_variations': 2,\n            'i': 4,\n            'guesses': 25578,\n            'l33t_variations': 1,\n            'dictionary_name': 'passwords',\n            'base_guesses': 12789,\n            'guesses_log10': 4.407866583030775,\n            'j': 11\n        }],\n    }\n\nAnother optional argument is ``max_length``, allowing override of the default max password length of 72.\n.. code:: python\n\n    from zxcvbn import zxcvbn\n\n    results = zxcvbn('JohnSmith321', user_inputs=['John', 'Smith'], max_length=88)\n\n.. warning::\n\n   We strongly advise against setting ``max_length`` greater than 72,\n   as it can lead to long processing times and may leave server-side applications open\n   to denial-of-service scenarios.\n\nCustom Ranked Dictionaries\n--------------------------\n\nIn order to support more languages or just add password dictionaries of your own, there is a helper function you may use.\n\n.. code:: python\n\n    from zxcvbn.matching import add_frequency_lists\n\n    add_frequency_lists({\n        'my_list': ['foo', 'bar'],\n        'another_list': ['baz']\n    })\n\nThese lists will be added to the current ones, but you can also overwrite the current ones if you wish.\nThe lists you add should be in order of how common the word is used with the most common words appearing first.\n\n\nCLI\n~~~\n\nYou an also use zxcvbn from the command line::\n\n    echo 'password' | zxcvbn --user-input \u003cuser-input\u003e | jq\n\nYou can include a ``--max-length`` argument::\n    echo '\u003clong password\u003e' | zxcvbn --max-length 142\n\nYou can also execute the zxcvbn module::\n\n    echo 'password' | python -m zxcvbn --user-input \u003cuser-input\u003e | jq\n\nContribute\n----------\n\n- Report an Issue: https://github.com/dwolfhub/zxcvbn-python/issues\n- Submit a Pull Request: https://github.com/dwolfhub/zxcvbn-python/pulls\n\nLicense\n-------\n\nThe project is licensed under the MIT license.\n\n\n.. |Build Status| image:: https://travis-ci.org/dwolfhub/zxcvbn-python.svg?branch=master\n   :target: https://travis-ci.org/dwolfhub/zxcvbn-python\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolfhub%2Fzxcvbn-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwolfhub%2Fzxcvbn-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolfhub%2Fzxcvbn-python/lists"}