Skip to main content

Python qrcode extension developed with rust.

Project description

rqrcode.py

CI

使用方法(usage)

安装(install)

pip install rqrcode

测试(test)

from rqrcode import rqrcode

if __name__ == '__main__':
    # 生成二维码PNG图片保存(Generate QR code PNG picture and save)
    rqrcode.qrcode_img("hello","C:\\Users\\user\\Desktop\\qrcode.png")
    # 生成二维码SVG图片保存(Generate QR code SVG picture and save)
    rqrcode.qrcode_svg("hello","C:\\Users\\user\\Desktop\\qrcode.svg")
    # 生成二维码unicode(Generate QR code unicode)
    rqrcode.qrcode_unicode("hello")

扩展(extend)

如果使用源码自定义扩展(If you use the source code to customize the extension)

  • 1.下载源码(Download source code)
git clone https://github.com/korykim/rqrcode
  • 2.安装(Install)
python -m venv C:\Users\user\myenv # 创建虚拟环境(Create virtual environment)

cd C:\Users\user\myenv\Scripts # 进入虚拟环境目录(Enter the virtual environment directory)

.\activate # 激活虚拟环境(Activate virtual environment)

pip install maturin # 安装maturin(Install maturin)

cd rqrcode # 进入源码目录(Enter the source code directory)

maturin develop # 会自动打包出一个 wheel 包,并且安装到当前的 venv 中(Automatically package a wheel package and install it to the current venv)
  • 3.现在可以在python中正常使用了(Now you can use it normally in python)
  • 4.发布whl包(Publish whl package)
maturin build --release --interpreter python

此时在./target/wheels目录下会生成whl包,可以上传到pypi或者使用pip install安装(At this time, a whl package will be generated in the ./target/wheels directory, which can be uploaded to pypi or installed using pip install).

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

rqrcode-0.0.1.tar.gz (13.6 kB view hashes)

Uploaded Source

Built Distributions

rqrcode-0.0.1-cp37-abi3-win_amd64.whl (1.1 MB view hashes)

Uploaded CPython 3.7+ Windows x86-64

rqrcode-0.0.1-cp37-abi3-win32.whl (1.1 MB view hashes)

Uploaded CPython 3.7+ Windows x86

rqrcode-0.0.1-cp37-abi3-musllinux_1_2_x86_64.whl (2.4 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ x86-64

rqrcode-0.0.1-cp37-abi3-musllinux_1_2_i686.whl (2.4 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

rqrcode-0.0.1-cp37-abi3-musllinux_1_2_armv7l.whl (2.5 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARMv7l

rqrcode-0.0.1-cp37-abi3-musllinux_1_2_aarch64.whl (2.4 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARM64

rqrcode-0.0.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

rqrcode-0.0.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.6 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

rqrcode-0.0.1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (2.5 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64le

rqrcode-0.0.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (2.6 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

rqrcode-0.0.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.2 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

rqrcode-0.0.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.2 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

rqrcode-0.0.1-cp37-abi3-manylinux_2_12_i686.manylinux2010_i686.whl (2.3 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.12+ i686

rqrcode-0.0.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.6 MB view hashes)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

rqrcode-0.0.1-cp37-abi3-macosx_10_7_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.7+ macOS 10.7+ x86-64

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