QR code creation with Python. I don't want to line up because I write the same thing every time I issue a commuter pass. ..

At the beginning of the year, I went to issue a commuter pass (reissue) for commuting.

Great procession. .. ..

What is this? Disneyland-like.

I write the same thing every time. Line up. Troublesome.

So, isn't it possible to improve efficiency by issuing a QR code once and holding it over each person's smartphone? ??

スクリーンショット 2020-01-08 6.26.35.png

First, install the module for QR code creation with pip.

$ pip install qrcode

After that, ask for attribute information for the first time and QR code it.

qrmake.py


import qrcode

name=input('Your name is?')
address=input('address?')
age=input('How old are you?')
tel=input('telephone number is?')
start=input('What is your departure?')
goal=input('How are you arriving?')
via=input('What is the waypoint?')

img=qrcode.make('Full name:'+str(name) + '  address:' + 'age:' +str(age) +'phone number' + str(tel) + 'Departure point:' +str(start) + 'arrival:'+str(goal) +'via:' +str(via))
img.save('Attribute information')

Like this.


(kyoto) MacBook-Air% python3 qrmake.py
Your name is?Tanaka
address? Kyoto City A Town B Street Mansion C101
How old are you? 40 years old
telephone number is? 090-000-0000
What is your departure? Kyoto Station
How are you arriving? Gojo Station
What is the waypoint?

Then a QR code will be issued.

You can either hand over the code on paper or skip it by email.

I'll ask Kyoto City.

スクリーンショット 2020-01-08 6.56.38.png

<Addition 2020.1.12>

I wrote the mechanism for creating a database and automatically issuing a QR code in the advanced version.

Reference: [The phone of the cleaning shop in the neighborhood kept ringing, so let's create a customer database that automatically issues a QR code in Python] (https://qiita.com/youichiokuda/items/c2fcfbae92c7f8c3d0ce)

Recommended Posts

QR code creation with Python. I don't want to line up because I write the same thing every time I issue a commuter pass. ..
I want to write to a file with Python
[Note] How to write QR code and description in the same image with python
I want to know the weather with LINE bot feat.Heroku + Python
Python: I want to measure the processing time of a function neatly
I want to make a game with Python
I want to make a music player and file music at the same time
I want to write a triple loop and conditional branch in one line in python
I want to write in Python! (1) Code format check
I want to write in Python! (2) Let's write a test
I want to work with a robot in python.
I want to write in Python! (3) Utilize the mock
I want to run a quantum computer with Python
How to write offline real time I tried to solve the problem of F02 with Python
[Python] I want to make a 3D scatter plot of the epicenter with Cartopy + Matplotlib!
I want to set up a GUI development environment with Python or Golang on Mac
[Python] I want to use the -h option with argparse
I want to send a message from Python to LINE Bot
I want to create a Dockerfile for the time being.
I want to clear up the question of the "__init__" method and the "self" argument of a Python class.
I want to record the execution time and keep a log.
I want to use a wildcard that I want to shell with Python remove
I created a Python library to call the LINE WORKS API
I want to output the beginning of the next month with Python
I want to do a full text search with elasticsearch + python
I wrote the code to write the code of Brainf * ck in python
I wanted to solve the ABC164 A ~ D problem with Python
[Introduction] I want to make a Mastodon Bot with Python! 【Beginners】
For the time being, I want to convert files with ffmpeg !!
Every time I draw a graph with python, I check it, so I will summarize only the simplest usage
I want to debug with Python
I was addicted to creating a Python venv environment with VS Code
I want to be cursed by a pretty girl every time I sudo! !!
I tried to get the authentication code of Qiita API with Python.
[Introduction to Python] How to write a character string with the format function
A note I looked up to make a command line tool in Python
How to write offline real time I tried to solve E12 with python
How to generate a QR code and barcode in Python and read it normally or in real time with OpenCV
Introduction to AI creation with Python! Part 2 I tried to predict the house price in Boston with a neural network
I want to build a Python environment
I want to play with aws with python
Try to solve the traveling salesman problem with a genetic algorithm (Python code)
[LINE Messaging API] I want to send a message from the program to everyone's LINE
I want to send Gmail with Python, but I can't because of an error
Because I don't want to go out with people whose desktops are dirty
I want to write an element to a file with numpy and check it.
Turn multiple lists with a for statement at the same time in Python
Python program is slow! I want to speed up! In such a case ...
I want to get the file name, line number, and function name in Python 3.4
A note I was addicted to when running Python with Visual Studio Code
How to get a list of files in the same directory with python
I tried to automatically send the literature of the new coronavirus to LINE with Python