python-netbox-qrcode
Port variant v13
Summary QR Code generation for netbox objects (3.13)
BROKEN
Package version 0.0.15
Homepage https://github.com/netbox-community/netbox-qrcode
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants v12
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 22 NOV 2024, 12:26:16 UTC
Port created 08 JAN 2023, 04:18:24 UTC
Subpackage Descriptions
single # Netbox QR Code Plugin [Netbox] plugin for generate QR codes for objects: Rack, Device, Cable. This plugin depends on [qrcode] and [Pillow] python library [Downloads] [Downloads] [Downloads] ## Compatibility | Plugin Version | NetBox Version | Tested on | | ------------- |:-------------| :-----------:| | 0.0.11 | 3.7.x | 3.7.x | | 0.0.14 | 4.0.x | v4.0.11 | | 0.0.15 | 4.1.x | v4.1.6 | ## Installation If Netbox was installed according to the standard installation instructions. It may be necessary to activate the virtual environment. ``` source /opt/netbox/venv/bin/activate ` The plugin is available as a Python package in pypi and can be installed with pip ` pip install netbox-qrcode ``` Enable the plugin in /opt/netbox/netbox/netbox/configuration.py: ``` PLUGINS = ['netbox_qrcode'] ``` Restart NetBox and add `netbox-qrcode` to your local_requirements.txt ## Configuration The following options are available: * `with_text`: Boolean (default True). Text label will be added to QR code image if enabled. * `text_template`: [Jinja2] template with {{ obj }} as context for device, rack, etc., using it ignores `text_fields` and `custom_text`. Example to output name and site in two lines with caption (See also screenshots below): ``` 'text_template': 'Name: {{ obj.name }}\nSite: {{ obj.site }}', ``` * `text_fields`: List of String (default ['name']). Text fields of an object that will be added as text label to QR image. It's possible to use custom field values. * `font`: String (default TahomaBold) Font name for text label ( Some font include in package, see fonts dir). * `text_location`: Where to render the text, relative to the QR code. Valid values are `"right"` (default), `"left"`", `"up"`, and `"down"`. * `custom_text`: String or None (default None) additional text label to QR code image (will be added after text_fields). * `qr_version`: Integer (default 1) parameter is an integer from 1 to 40 that controls the size of the QR Code (the smallest, version 1, is a 21x21 matrix). * `qr_error_correction`: Integer (default 0), controls the error correction used for the QR Code. The following values are available: 1 - About 7% or less errors can be corrected. 0 - About 15% or less errors can be corrected. 2 - About 30% or less errors can be corrected. 3 - About 25% or less errors can be corrected. * `qr_box_size`: Integer (default 6), controls how many pixels each "box" of the QR code is. * `qr_border`: Integer (default 4), controls how many boxes thick the border should be (the default is 4, which is the minimum according to the specs). ### Per object options Per object options override default options. Per object options dictionary can contains any of default options inside. * `device`: Dict or None (default {'text_fields': ['name', 'serial']}), set None to disble QR code * `rack`: Dict or None (default {'text_fields': ['name']}) , set None to disble QR code * `cable`: Dict or None ( defaul {'text_fields': ['_termination_a_device', 'termination_a', '_termination_b_device', 'termination_b',]}), set None to disble QR code Configuration example: ``` PLUGINS_CONFIG = { 'netbox_qrcode': { 'with_text': True, 'text_fields': ['name', 'serial'],
Configuration Switches (platform-specific settings discarded)
PY312 OFF Build using Python 3.12 PY313 ON Build using Python 3.13
Package Dependencies by Type
Build (only) python313:dev:std
python-pip:single:v13
autoselect-python:single:std
Build and Runtime python313:primary:std
Runtime (only) python-qrcode:single:v13
python-Pillow:single:v13
Download groups
main mirror://PYPIWHL/57/ca/2f15b17173d48640b6d97588d6fbfd3b560c237ed8d2bf60f42460dbf78e
Distribution File Information
edf7bfe0e5510f4ef2c4fdf29a0961f9fe2d1fe2295298e72ba4ccf93016a2bb 1690432 python-src/netbox_qrcode-0.0.15-py3-none-any.whl
Ports that require python-netbox-qrcode:v13
No other ports depend on this one.