Skip to content

Generate Barcode and QRCode from Text and support many types and formats.

Notifications You must be signed in to change notification settings

CUBETIQ/barcode-web-api

Repository files navigation

Generate Barcode/QRCode Web API

Go to Web API

  • Flask
  • PyBarcode (python-barcode)
  • PyQRCode (pyqrcode)

Features

  • Barcode
  • QRCode

TODO

  • Export to Image
  • Export to SVG
  • Barcode/QRCode Options

Barcode Options

  • Support types (type)
type=[code128 | code39 ean | ean13 | ean14 | ean8 | gs1 | gs1_128 | gtin | isbn | isbn10 | isbn13 | issn | itf | jan | pzn | upc | upca]
  • Support formats (format)
format=[png | svg]
  • Support width and height (width and height)
width=[0.1-100]
height=[0.1-100]
  • Support Font Size (font_size)
font_size=[0.1-50]
  • Support Text Distance (text_distance)
text_distance=[0.1-50]
  • Support backgrounds (background)
background=[COLOR_NAME] (Example: red, green, blue, etc)
  • Support foregrounds (foreground)
foreground=[COLOR_NAME] (Example: red, green, blue, etc)
  • Support Space Zone (quiet_zone)
quiet_zone=[1-100]
  • Support downloadable (dl)
dl=[1 / 0]
  • Barcode Types and Availables
https://barcode-web-api.heroku.ctdn.dev/barcode/types
  • Generate Barcode from Text (GET/POST)
https://barcode-web-api.heroku.ctdn.dev/barcode?text=1234-5678-9012&type=code128
  • Generate Barcode from Text with FORM (POST)
curl --location --request POST 'https://barcode-web-api.heroku.ctdn.dev/barcode' \
--form 'text="1234-5678-9012"' \
--form 'type="code128"'

QRCode Options

  • Support types (type)
type=[text | number]
  • Support formats (format)
format=[png | svg]
  • Support scales (scale)
scale=[1-100]
  • Support colors (color)
color=[RGB] (Example: 000 | FFF | 000000 | FFFFFF | more)
  • Support backgrounds (background)
background=[RGB] (Example: 000 | FFF | 000000 | FFFFFF | more)
  • Support Spae Zone (quiet_zone)
quiet_zone=[1-100]
  • Support downloadable (dl)
dl=[1 / 0]
  • QRCode Types and Availables
https://barcode-web-api.heroku.ctdn.dev/qrcode/types
  • Generate QRCode from Text (GET/POST)
https://barcode-web-api.heroku.ctdn.dev/qrcode?text=1234-5678-9012&type=text&scale=10
  • Generate QRCode from Text with FORM (POST)
curl --location --request POST 'https://barcode-web-api.heroku.ctdn.dev/qrcode' \
--form 'text="1234-5678-9012"' \
--form 'type="text"' \
--form 'scale=10'

Local Development

pip install -r requirements.txt
python3 -m flask run --reload

Contributors