Skip to main content

A concise Flask extension to render QR codes on Jinja2 templates using python-qrcode

Project description

Flask-QRcode

PyPI version

A concise Flask extension to easily render QR codes on Jinja2 templates using python-qrcode

You can read the full documentation here.

Installation

pip install Flask-QRcode

Usage:

Extend the app:

from flask_qrcode import QRcode
# [...]
QRcode(app)
# [...]

Then use it within your templates:

Basic usage:

<img src="{{ qrcode(STRING_TO_ENCODE) }}">

More examples:

For more examples, just run the sample application in this repository.

Sample Application

Contributing:

Thank you for considering contributing to this package.

As this is a simple package, the process is pretty straightforward...

  1. Fork this repository
  2. Checkout from master with to a feature branch with a name related to what is being contributed (e.g. "colored-qrcodes")

*It's highly recommended that your contribution either creates a new feature, fixes something OR refactors the code and does not mix these (e.g. one PR fixing some existent feature and refactoring non-related code).

  1. Install dependencies and flask_qrcode on editable mode
    pip install -e .  # for installing flask_qrcode on editable mode
    
  2. Do your magic
  3. Provide new tests for your work and check that both this and the old ones are passing
  4. Pull Request!

Testing:

  1. Install dependencies and flask_qrcode on editable mode
pip install -e .  # for installing flask_qrcode on editable mode
  1. Run pytest
python setup.py test  # on package's root dir

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_qrcode-3.2.0.tar.gz (39.9 kB view details)

Uploaded Source

Built Distribution

Flask_QRcode-3.2.0-py3-none-any.whl (40.7 kB view details)

Uploaded Python 3

File details

Details for the file flask_qrcode-3.2.0.tar.gz.

File metadata

  • Download URL: flask_qrcode-3.2.0.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.4

File hashes

Hashes for flask_qrcode-3.2.0.tar.gz
Algorithm Hash digest
SHA256 2f7cd50193b877daa61db8764bf5ed34a23818d6a18d306bf50d5bb334f24584
MD5 56020c3dde5059bb452b7de13829fd2d
BLAKE2b-256 066fabfeb033c1d47bc10a56272f307388ddd93b5ffe147285b1b7dccc81af81

See more details on using hashes here.

File details

Details for the file Flask_QRcode-3.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for Flask_QRcode-3.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91a51675e14a182f9480cda9f2ff7bb478637823af8d56dd7d415c61a56ae2ac
MD5 d4581503c70bdb1c04ff93617e26d4e0
BLAKE2b-256 cd1cffa7c9e611f74ccec15d01c1134565903135be61e42d30f24e692e8cbcb9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page