If you use #Django CommonPasswordValidator you will like this https://pypi.org/project/fast-password-validation/ rewrite using Bloom filter with 4x speed up and ⅓ memory usage