A useful verification code generation tool.
Project description
安装
pip install gvcode
例子
from gvcode import VFCode
if __name__ == '__main__':
vc = VFCode()
# 验证码类型
# 自定义验证码
# vc.generate('abcd')
# 数字验证码(默认5位)
# vc.generate_digit()
# vc.generate_digit(4)
# 字母验证码(默认5位)
# vc.generate_alpha()
# vc.generate_alpha(5)
# 数字字母混合验证码(默认5位)
# vc.generate_mix()
# vc.generate_mix(6)
# 数字加减验证码(默认加法)
vc.generate_op()
# 数字加减验证码(加法)
# vc.generate_op('+')
# 数字加减验证码(减法)
# vc.generate_op('-')
# 图片字节码
# print(vc.get_img_bytes())
# 图片base64编码
print(vc.get_img_base64())
# 保存图片
vc.save()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gvcode-0.0.7.tar.gz
(10.8 MB
view details)
Built Distribution
gvcode-0.0.7-py3-none-any.whl
(10.9 MB
view details)
File details
Details for the file gvcode-0.0.7.tar.gz
.
File metadata
- Download URL: gvcode-0.0.7.tar.gz
- Upload date:
- Size: 10.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71bc0ef4c142a2d2ee73d55e8efb7bbe915ad6b4779beb2d2957545fe31d19ab |
|
MD5 | e4d3f59a09aed8f3447054d730f50113 |
|
BLAKE2b-256 | 190ea8472c88d8eb4921bd1933e3056ae8021d24ceaaa30bd73549c9565ec964 |
File details
Details for the file gvcode-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: gvcode-0.0.7-py3-none-any.whl
- Upload date:
- Size: 10.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f6500a21faaee192ae9dc1c2813c6356e07adea4dd71a6c42430a54b3cf8cd8 |
|
MD5 | 31a5cc5ef270eac06d8283ffb019918e |
|
BLAKE2b-256 | f9c8ec258df1cb9145c366f78a5a174f2f17afa9731530d8b252afe949a55ab4 |