1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
# zxcvbn-rs-py
<p align="center">
<em>Python bindings for <a href="https://github.com/shssoichiro/zxcvbn-rs">zxcvbn-rs</a>, the Rust implementation of zxcvbn</em>
</p>
[](https://github.com/fief-dev/zxcvbn-rs-py/actions)
[](https://badge.fury.io/py/zxcvbn-rs-py)
---
**Documentation**: <a href="https://fief-dev.github.io/zxcvbn-rs-py/" target="_blank">https://fief-dev.github.io/zxcvbn-rs-py/</a>
**Source Code**: <a href="https://github.com/fief-dev/zxcvbn-rs-py" target="_blank">https://github.com/fief-dev/zxcvbn-rs-py</a>
---
## Installation
```sh
pip install zxcvbn-rs-py
```
## Quickstart
```py
from zxcvbn_rs_py import zxcvbn
r = zxcvbn("correcthorsebatterystaple")
print(r.score)
```
## Benchmark
Thanks to its Rust core, zxcvbn-rs-py is **~5 times faster** than the pure Python implementation, [zxcvbn-python](https://github.com/dwolfhub/zxcvbn-python).

## Serve the documentation
You can serve the Mkdocs documentation with:
```bash
hatch run docs-serve
```
It'll automatically watch for changes in your code.
## License
This project is licensed under the terms of the MIT license.
|