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 details)
Built Distribution
File details
Details for the file promptpay-1.0.0.tar.gz
.
File metadata
- Download URL: promptpay-1.0.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3d901f495f091b1453fb573f596655ab57f43d6d481b00d085a571d82d8d5d0 |
|
MD5 | 9a3f6f1557f5c9db0995e1ffab72b142 |
|
BLAKE2b-256 | dc3e3680658cffc97ada6070b9b90022915ee9463ff0e814b5b73824ff3a9bb8 |
File details
Details for the file promptpay-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: promptpay-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cf9888cabb2b4059f00b4b7511c15451aee329ecd9483268dfe4940b7c85324 |
|
MD5 | ee318b7f928dacdd2bc7829d50b77aa2 |
|
BLAKE2b-256 | 5b576b9d2bef430128db0c5508291d07c97d99d79b9a3590bb52e24f2678c718 |