Getting Started¶
Installation¶
The qrdm package is written in pure Python; the ease of installation is dependent on
availability of its dependencies.
The simplest method of installing the qrdm package is via pip.
pip install qrdm
If pip is able to reach a suitable package index, qrdm will install along with the
core Python dependencies listed below.
Important
The QR decoding functionality depends on the pyzbar python package, which in
turn depends on the zbar shared library. This may require you to install the zbar
package via your system’s package manager.
See the pyzbar installation instructions for more details.
Two main “package extras” are available for qrdm that provide REST API application
(“backend”) and Web application (“frontend”) services for the QR encoding & decoding
functions. These can be included by specifying qrdm[backend] or
qrdm[frontend] to the installation command above, respectively.
Dependencies¶
The core dependencies of qrdm are:
pythonversion 3.10 or latercharset-normalizerversion 3.2 or laterPillowversion 10.1 or laterprotobufversion 4.22 or laterpydanticversion 2.2 or laterpydantic-settingsPyMuPDFversion 1.22 or laterpyzbarversion 0.1.8 or laterqrcodeversion 7.3 or laterreedsoloversion 1.7.0 or laterreportlabversion 4.0 or laterstructlogversion 23.0 or latersvglibversion 1.5 or later
The Web UI functionality depends on:
streamlitversion 1.28 or later
The REST API application functionality depends on:
fastapiversion 0.109python-multipartversion 0.0.6 or laterstarlette[full]uvicorn[standard]
Development environment¶
Alternatively, a development environment may be set up via:
git clone https://github.com/mit-ll/qrdm
cd qrdm
python -m pip install -e .[dev]
to create an “editable” install that will respond to local file changes, and contains
both the frontend and backend dependencies in addition to all of the
requirements for local development and testing.
The package’s tests can then be run directly in the development environment via:
pytest ./tests
Alternatively, the package is also configured to use tox to
perform tests across multiple python versions via:
tox
See the configuration in tox.ini in the repository root for details on the test stage
configuration and outputs.