https://github.com/alishtory/qrcode-terminal
在控制台打印二维码 Draw QRCodes in your terminal by Python
https://github.com/alishtory/qrcode-terminal
py-qrcode python qrcode-terminal
Last synced: 6 months ago
JSON representation
在控制台打印二维码 Draw QRCodes in your terminal by Python
- Host: GitHub
- URL: https://github.com/alishtory/qrcode-terminal
- Owner: alishtory
- License: mit
- Created: 2017-02-10T08:01:17.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-14T09:38:50.000Z (about 8 years ago)
- Last Synced: 2025-07-18T19:01:32.728Z (12 months ago)
- Topics: py-qrcode, python, qrcode-terminal
- Language: Python
- Homepage: https://1tx.me/python/qrcode-terminal.html
- Size: 50.8 KB
- Stars: 99
- Watchers: 3
- Forks: 30
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python QRCode Terminal
You can draw QR codes in your terminal by Python:
![Py QrCode][cmdqrcode-example-img]
## Install Dependencies
You need install these:
```shell
yum install -y python-devel zlib-devel libjpeg-turbo-devel
pip install pillow qrcode
```
## Install
Can be installed with pip:
``` shell
pip install qrcode-terminal
```
## Useage
### As Library
```python
import qrcode_terminal
qrcode_terminal.draw('http://www.baidu.com')
```
![Py QrCode][pyqrcode-example-img]
### In Terminal
``` shell
qrcode-terminal-py -d http://www.baidu.com
echo "http://www.baidu.com" | qrcode-terminal-py
```
![Py QrCode][cmdqrcode-example-img]
[pyqrcode-example-img]:https://raw.githubusercontent.com/alishtory/qrcode-terminal/master/example/pyqrcode.jpg
[cmdqrcode-example-img]:https://raw.githubusercontent.com/alishtory/qrcode-terminal/master/example/cmdqrcode.jpg
## License
Released under the [MIT License](https://raw.githubusercontent.com/dawndiy/qrcode-terminal/master/LICENSE).