.. Flask-QRcode documentation master file, created by sphinx-quickstart on Wed Feb 28 11:03:06 2018. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to Flask-QRcode ======================= .. toctree:: :maxdepth: 2 :caption: Contents: Flask-QRcode is a concise Flask extension to easily render QR codes on Jinja2 templates using python-qrcode. User's guide ============ It is very straightforward to use Flask-QRcode on your Flask projects, and you can find a sample application with running examples on `the repository on GitHub `_. Installation ------------ You can install it from PyPi: :: $ pip install flask-qrcode Or download the latest release from the `GitHub repository `_. Note tha all the latest releases should be signed with the PGP key `0x0dc77fc61ed3ecc4 `_ (also found on `keybase `_). Basic usage ----------- **Extend the app:** :: from flask_qrcode import QRcode # [...] QRcode(app) # [...] **Then use it within your templates:** :: {# Basic usage: #} More examples ------------- **Simple example:** :: .. image:: /_static/examples/simple-example.png **Changing box size:** :: .. image:: /_static/examples/shape-example-1.png **Changing border size:** :: .. image:: /_static/examples/shape-example-2.png **Changing QRcode error correction according to python-qrcode documentations:** :: .. image:: /_static/examples/qrcode-example-1.png **A "combo" example changing more than one parameter:** :: .. image:: /_static/examples/combo-example-1.png **Changing the color of the QR code:** :: .. image:: /_static/examples/color-example-1.png **Rendering an icon inside the QR code (external link):** :: .. image:: /_static/examples/icon-example-1.png **Rendering an icon inside the QR code (local file):** :: .. image:: /_static/examples/icon-example-2.png 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). 3. Install dependencies and flask_qrcode on editable mode :: $ pip install -e . # for installing flask_qrcode on editable mode 4. Do your magic 5. Provide new tests for your work and check that both this and the old ones are passing. 6. Pull Request! Testing ======= 1. Install dependencies and flask_qrcode on editable mode :: $ pip install -e . # for installing flask_qrcode on editable mode 2. Run pytest :: $ python setup.py test # in package's root dir Source code documentation ========================= // Automatically generated by Sphinx's autodocs based on the source code's docstrings. * :ref:`genindex` * :ref:`modindex`