This library lets you validate usernames against a blacklist. The blacklist data is based on the data from The-Big-Username-Blacklist and contains privilege, programming terms, section names, financial terms and actions.
You can try the blacklist using the tool Username checker.
the_big_username_blacklist exposes a function named validate, you can use that function to see if a word is occuring in the blacklist.
Validating a username is easy, if the word is in the blacklist, return False (validation failed), otherwise True. Example:
>>>> from the_big_username_blacklist import validate
>>>> validate("root")
False
>>>> validate("martin")
True
If you only want to retrive the blacklist data, you can find it in the list
property.
>>>> from the_big_username_blacklist import get_blacklist
>>>> get_blacklist()
[ '400',
'401',
'403'...
This package is available through pip
$ pip install the-big-username-blacklist
Make sure you have the necessary dependencies (pytest)
pip install -r requirements/tests.txt
Then run the tests
py.test tests
Want to contribute? Awesome. Just send a pull request.
The-Big-Username-Blacklist-Python is released under the MIT License.