Skip to content

Self-hosted QR-code generator service with web UI.

Notifications You must be signed in to change notification settings

mbarde/flask-qrcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QR-Code generator with web UI

This is a QR-generator service you can host on your own machine.

Basically its a Flask server wrapped around this QR code image generator providing an easy-to-use web UI (and an API) to generate QR-codes.

Hint: QR-Codes are cached in folder codes. In production you should deploy a proper clean-up mechanism here ;)

Frontend

Screenshot_2023-10-24_09-08-15

API

Example: http://localhost:5000?url=https://mbarde.de&boxsize=50

Expected parameters:

  • url: URL to "qr-encode"
  • size (optional): Size (width & height) of resulting QR code image
  • boxsize (optional): Size of single box of the QR code (when size is set as well, this is the size of each box before image gets resized)
  • fill (optional): Hex code for fill color (without #)
  • back (optional): Hex code for background color (without #)

Setup & run

Within your virtual environment:

pip install -r requirements.txt
env FLASK_APP=server.py flask run --host=0.0.0.0

Access via http://localhost:5000/

Serve with waitress

In production enviroments I suggest serving the application via waitress:

pip install waitress
waitress-serve --port=5000 --call "server:create_app"