Quikkly Server Module.

 

The Quikkly server module is intended for batch generation of codes (using standard or custom Quikkly templates) on server or desktop computers. The SDK has two main components: the C++ native libraries built for a particular OS, and bindings to use the native libraries from other programming languages.

Platforms and Languages

The server-side native libraries are available for:

  • Ubuntu Linux 14.04, 16.04, 18.04,

  • CentOS Linux 6.8, 6.9, 7.4,

  • MacOS High Sierra and above

  • Please let us know if you require builds for other platforms.

The Python SDK supports Python 2.7, and 3.4 - 3.7.

We currently have the SDKs available for Python and Java, and command-line Python scripts that can be called from any language. Some of our customers build their applications in other languages: Ruby, PHP, C# or Go. In that case we recommend installing the Python SDK, and calling the included quikkly-generate-svg.py and quikkly-scan-image.py scripts as an external process.

Python Server Integration

  • Download from PyPI: https://pypi.org/project/quikkly-python-sdk/

  • Source code: https://bitbucket.org/quikkly/python-sdk/src/master/

  • Code generation script: https://bitbucket.org/quikkly/python-sdk/src/master/scripts/quikkly-generate-svg.py

Getting Started

Install the SDK

pip install quikkly-python-sdk

Generating SVG codes has no extra Python dependencies. Scanning codes from images also requires installing the numpy and Pillow Python packages.

Download the Native Libraries

Contact us to obtain the C++ native libraries built for your OS, and unzip them into a folder on your server.

Create a Code

quikkly-generate-code.py --native-libs-dir <path> --type template0001style1 --data 12345 --output-file mycode.svg

Open mycode.svg in a browser to view it.

Applying Styles and Themes

Please see the the Codes and Templates page for the possible style settings and their behaviour, and quikkly-generate-svg.py script source code for how to set them on the command line.

Note that --data-colors can be provided multiple times.

Loading Custom Blueprints

If you have a custom blueprint_xxxx.json file from us, copy it onto your server, and use the command-line options

quikkly-generate-code.py --native-libs-dir <path> --blueprint-file <path> --type templateXXXXstyle1 <rest of the options>

Note that your blueprint will contain only a few template IDs, and won’t contain the default ones like template0001style1. So make sure to select your --type templateXXXXstyle1 or similar.

Converting SVG Codes to PNG Images

The Quikkly SDK outputs generated codes as SVG vector images. These can be rendered in most web browsers, and mobile WebViews.

You can convert the SVGs to PNGs using the ImageMagick library and its convert and mogrify command-line tools.

On Ubuntu: apt-get install imagemagick

On MacOS with Homebrew: brew install --with-librsvg imagemagick

Then use with: convert -density 300 -background none mycode.svg mycode.png

To convert many files at the same time, use mogrify -format png -density 300 -background none *.svg

The -density 300 parameter controls the output resolution, and -background none ensures that the space outside of the code is transparent instead of white.

The ImageMagick documentation lists many more options, but these two are sufficient to get started.

Java Server Integration

The Java SDK for server and desktop usage is the same net.quikkly.core:quikklycore-lib as used for Android and is available from Github