{"id":18709200,"url":"https://github.com/jojoee/promptpay","last_synced_at":"2025-04-12T10:35:11.129Z","repository":{"id":41197269,"uuid":"280080107","full_name":"jojoee/promptpay","owner":"jojoee","description":"Python library to generate PromptPay QR Code","archived":false,"fork":false,"pushed_at":"2022-10-17T09:48:45.000Z","size":65,"stargazers_count":16,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T14:24:31.192Z","etag":null,"topics":["promptpay","promptpay-qr","qrcode"],"latest_commit_sha":null,"homepage":"https://promptpay.readthedocs.io/en/latest/?","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jojoee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-16T07:05:38.000Z","updated_at":"2024-02-02T17:35:33.000Z","dependencies_parsed_at":"2022-08-31T03:41:09.676Z","dependency_job_id":null,"html_url":"https://github.com/jojoee/promptpay","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jojoee%2Fpromptpay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jojoee%2Fpromptpay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jojoee%2Fpromptpay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jojoee%2Fpromptpay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jojoee","download_url":"https://codeload.github.com/jojoee/promptpay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248553890,"owners_count":21123543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["promptpay","promptpay-qr","qrcode"],"created_at":"2024-11-07T12:26:41.159Z","updated_at":"2025-04-12T10:35:10.880Z","avatar_url":"https://github.com/jojoee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PromptPay\n\n![continuous-integration](https://github.com/jojoee/promptpay/workflows/continuous-integration/badge.svg?branch=master)\n![continuous-delivery](https://github.com/jojoee/promptpay/workflows/continuous-delivery/badge.svg?branch=master)\n![runnable](https://github.com/jojoee/promptpay/workflows/runnable/badge.svg?branch=master)\n![runnable-cli](https://github.com/jojoee/promptpay/workflows/runnable-cli/badge.svg?branch=master)\n[![PyPI version fury.io](https://badge.fury.io/py/promptpay.svg)](https://pypi.python.org/pypi/promptpay/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![codecov](https://codecov.io/gh/jojoee/promptpay/branch/master/graph/badge.svg)](https://codecov.io/gh/jojoee/promptpay)\n\nPython library to generate PromptPay QR Code, inspired from [dtinth/promptpay-qr](https://github.com/dtinth/promptpay-qr)\n\n## Installation\n\n```\npip install promptpay\n\n# or\ngit clone https://github.com/jojoee/promptpay\ncd promptpay\npython setup.py install\n```\n\n## Usage\n\n### Library\n\n```python\nfrom promptpay import qrcode\n\n# generate a payload\nid_or_phone_number = \"0841234567\"\npayload = qrcode.generate_payload(id_or_phone_number)\npayload_with_amount = qrcode.generate_payload(id_or_phone_number, 1.23)\n\n# export to PIL image\nimg = qrcode.to_image(payload)\n\n# export to file\nqrcode.to_file(payload, \"./qrcode-0841234567.png\")\nqrcode.to_file(payload_with_amount, \"/Users/joe/Downloads/qrcode-0841234567.png\") \n```\n\n### CLI\n\n```bash\npython -m promptpay qrcode --id=\"0841234567\"\npython -m promptpay qrcode --id=\"0841234567\" --file=\"./qrcode-cli.png\"\npython -m promptpay qrcode --id=\"0841234567\" --show=true\npython -m promptpay qrcode \\\n  --id=\"0841234567\" \\\n  --amount=2.34 \\\n  --file=\"/Users/joe/Downloads/qrcode-cli-with-amount.png\"\n```\n\n## Development\n\n```bash\n# Conda env\nconda create --name promptpay3.10 python=3.10.4\nconda activate promptpay3.10\nconda create --name promptpay3.9 python=3.9.12\nconda activate promptpay3.9\nconda create --name promptpay3.7 python=3.7.13\nconda activate promptpay3.7\nconda remove --name promptpay3.10 --all\nconda search python\n\n# others\npython -V\npip install -r requirements.txt\npip install -r requirements-dev.txt\npython -m flake8 --ignore=E501 promptpay tests\npython -m pytest tests --cov=./ --cov-report=xml\npip list --outdated --format=freeze | grep -v '^\\-e' | cut -d = -f 1  | xargs -n1 pip install -U\npython -m pip list --format=freeze \u003e requirements-tmp.txt\npip install libscrc==\npip install Pillow==\npip install promptpay\npip install promptpay==1.1.7\npip install .\npip install --force-reinstall promptpay\n```\n\n## Reference\n\n- [มีอะไรอยู่ใน PromptPay QR แกะสเปค QR ที่จะใช้จ่ายผ่าน mobile banking ได้ทุกธนาคารในอนาคต](https://www.blognone.com/node/95133)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjojoee%2Fpromptpay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjojoee%2Fpromptpay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjojoee%2Fpromptpay/lists"}