Python library to generate PromptPay QR Code
Project description
PromptPay
Python library to generate PromptPay QR Code, inspired from dtinth/promptpay-qr
Installation
pip install promptpay
# or
git clone https://github.com/jojoee/promptpay
cd promptpay
python setup.py install
Usage
Library
from promptpay import qrcode
# generate a payload
id_or_phone_number = "0841234567"
payload = qrcode.generate_payload(id_or_phone_number)
payload_with_amount = qrcode.generate_payload(id_or_phone_number, 1.23)
# export to PIL image
img = qrcode.to_image(payload)
# export to file
qrcode.to_file(payload, "./qrcode-0841234567.png")
qrcode.to_file(payload_with_amount, "/Users/joe/Downloads/qrcode-0841234567.png")
Reference
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
promptpay-1.0.0.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for promptpay-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cf9888cabb2b4059f00b4b7511c15451aee329ecd9483268dfe4940b7c85324 |
|
MD5 | ee318b7f928dacdd2bc7829d50b77aa2 |
|
BLAKE2b-256 | 5b576b9d2bef430128db0c5508291d07c97d99d79b9a3590bb52e24f2678c718 |