Skip to main content

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


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.6.tar.gz (557.7 kB view details)

Uploaded Source

Built Distribution

gvcode-0.0.6-py3-none-any.whl (555.6 kB view details)

Uploaded Python 3

File details

Details for the file gvcode-0.0.6.tar.gz.

File metadata

  • Download URL: gvcode-0.0.6.tar.gz
  • Upload date:
  • Size: 557.7 kB
  • 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

Hashes for gvcode-0.0.6.tar.gz
Algorithm Hash digest
SHA256 9e3a19c3dbafdffa320474544ea7372f717d29fb6c8ffb2d06fbc538d162374a
MD5 3747ffa611f75de1e7bfaf0b4a7653ed
BLAKE2b-256 56558c2477c7289ac6ce0f3b1b4437b317361152c6a900990aad8c9edaf93f7e

See more details on using hashes here.

File details

Details for the file gvcode-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: gvcode-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 555.6 kB
  • 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

Hashes for gvcode-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 20ed60940339eefe8fd00319b11c42917c320bb57c929071fd910805e2dc6bf5
MD5 cd7ea94b1456380cca0b5aad942b4239
BLAKE2b-256 b2785a17e7bca8336edb14b1522892cdaee4470cafe78f7844c1d4314a461da5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page